Completed
Branch develop (59ab9a)
by
unknown
27:43
created

MyObjectTest::assertPostConditions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/* <one line to give the program's name and a brief idea of what it does.>
3
 * Copyright (C) <year>  <name of author>
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
18
19
/**
20
 * \file    test/unit/MyObjectTest.php
21
 * \ingroup mymodule
22
 * \brief   PHPUnit test for MyObject class.
23
 */
24
25
namespace test\unit;
26
27
/**
28
 * Class MyObjectTest
29
 * @package Testmymodule
30
 */
31
class MyObjectTest extends \PHPUnit_Framework_TestCase
32
{
33
	/**
34
	 * Global test setup
35
	 */
36
	public static function setUpBeforeClass()
37
	{
38
		fwrite(STDOUT, __METHOD__ . "\n");
39
	}
40
41
	/**
42
	 * Unit test setup
43
	 */
44
	protected function setUp()
45
	{
46
		fwrite(STDOUT, __METHOD__ . "\n");
47
	}
48
49
	/**
50
	 * Verify pre conditions
51
	 */
52
	protected function assertPreConditions()
53
	{
54
		fwrite(STDOUT, __METHOD__ . "\n");
55
	}
56
57
	/**
58
	 * A sample test
59
	 */
60
	public function testSomething()
61
	{
62
		fwrite(STDOUT, __METHOD__ . "\n");
63
		// TODO: test something
64
		$this->assertTrue(true);
65
	}
66
67
	/**
68
	 * Verify post conditions
69
	 */
70
	protected function assertPostConditions()
71
	{
72
		fwrite(STDOUT, __METHOD__ . "\n");
73
	}
74
75
	/**
76
	 * Unit test teardown
77
	 */
78
	protected function tearDown()
79
	{
80
		fwrite(STDOUT, __METHOD__ . "\n");
81
	}
82
83
	/**
84
	 * Global test teardown
85
	 */
86
	public static function tearDownAfterClass()
87
	{
88
		fwrite(STDOUT, __METHOD__ . "\n");
89
	}
90
91
	/**
92
	 * Unsuccessful test
93
	 *
94
	 * @param  Exception $e    Exception
95
	 * @throws Exception
96
	 */
97
	protected function onNotSuccessfulTest(Exception $e)
98
	{
99
		fwrite(STDOUT, __METHOD__ . "\n");
100
		throw $e;
101
	}
102
}
103