1 | <?php |
||
14 | class ShellModelTruncatorTest extends CakeTestCase { |
||
15 | |||
16 | /** |
||
17 | * The fixtures |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | public $fixtures = array( |
||
22 | 'plugin.fake_seeder.apple', |
||
23 | 'plugin.fake_seeder.banana', |
||
24 | 'plugin.fake_seeder.pear', |
||
25 | ); |
||
26 | |||
27 | /** |
||
28 | * The shell object |
||
29 | * |
||
30 | * @var null|Shell |
||
31 | */ |
||
32 | protected $_shell = null; |
||
33 | |||
34 | /** |
||
35 | * The object under test |
||
36 | * |
||
37 | * @var null|ShellModelTruncator |
||
38 | */ |
||
39 | protected $_truncator = null; |
||
40 | |||
41 | /** |
||
42 | * Setup the object under test |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | public function setUp() { |
||
58 | |||
59 | /** |
||
60 | * Test the constructor |
||
61 | * |
||
62 | * @return void |
||
63 | * @covers ::__construct |
||
64 | */ |
||
65 | public function testConstruct() { |
||
69 | |||
70 | /** |
||
71 | * Tests the truncateModels function |
||
72 | * |
||
73 | * @return void |
||
74 | * @covers ::truncateModels |
||
75 | */ |
||
76 | public function testTruncateModels() { |
||
84 | } |
||
85 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: