1212namespace Cross \TestUtilsTest \TestCase ;
1313
1414use Cross \TestUtils \TestCase \AssertDefaultAttributesValuesTrait ;
15- use Cross \TestUtils \TestCase \GetTargetInstanceTrait ;
1615use Cross \TestUtils \TestCase \TestDefaultAttributesTrait ;
1716use Cross \TestUtils \TestCase \TestUsesTraitsTrait ;
1817
1918/**
2019 * Tests for \Cross\TestUtils\TestCase\TestDefaultAttributesTrait
21- *
20+ *
2221 * @covers \Cross\TestUtils\TestCase\TestDefaultAttributesTrait
2322 * @author Mathias Gelhausen <gelhausen@cross-solution.de>
2423 *
@@ -30,12 +29,12 @@ class TestDefaultAttributesTraitTest extends \PHPUnit_Framework_TestCase
3029{
3130 use TestUsesTraitsTrait;
3231
33- private $ usesTraits = [ 'target ' => TestDefaultAttributesTrait::class, AssertDefaultAttributesValuesTrait::class, GetTargetInstanceTrait::class ];
32+ private $ usesTraits = [ 'target ' => TestDefaultAttributesTrait::class, AssertDefaultAttributesValuesTrait::class ];
3433
3534 public function testThrowsExceptionIfPropertyDoesNotExist ()
3635 {
3736 $ this ->expectException (\PHPUnit_Framework_Exception::class);
38- $ this ->expectExceptionMessage ('must define ' );
37+ $ this ->expectExceptionMessage ('$defaultAttributes" is not defined ' );
3938
4039 $ target = new class { use TestDefaultAttributesTrait; };
4140
@@ -45,7 +44,7 @@ public function testThrowsExceptionIfPropertyDoesNotExist()
4544 public function testThrowsExceptionIfPropertyIsNotAnArray ()
4645 {
4746 $ this ->expectException (\PHPUnit_Framework_Exception::class);
48- $ this ->expectExceptionMessage ('be an array ' );
47+ $ this ->expectExceptionMessage ('not an array ' );
4948
5049 $ target = new class { use TestDefaultAttributesTrait; public $ defaultAttributes = 'string ' ; };
5150
@@ -68,16 +67,8 @@ public function __construct($obj) {
6867
6968 public $ defaultAttributes = ['one ' , 'two ' ];
7069
71- public $ getTargetInstanceArgs ;
72-
7370 public static $ assertDefaultAttributesValuesArgs ;
7471
75- public function getTargetInstance ()
76- {
77- $ this ->getTargetInstanceArgs = func_get_args ();
78- return $ this ->target ;
79- }
80-
8172 public static function assertDefaultAttributesValues ()
8273 {
8374 static ::$ assertDefaultAttributesValuesArgs = func_get_args ();
@@ -87,15 +78,6 @@ public static function assertDefaultAttributesValues()
8778
8879 $ target ->testDefaultAttributes ();
8980
90- static ::assertEquals (
91- [
92- ['getDefaultAttributesTarget ' , 'getTarget ' ],
93- ['defaultAttributesTarget ' , 'target ' ],
94- 'defaultAttributes '
95- ],
96- $ target ->getTargetInstanceArgs
97- );
98-
9981 static ::assertEquals (
10082 [
10183 $ target ->defaultAttributes ,
0 commit comments