1212
1313class ChainTest extends TestCase
1414{
15- public function test () {
15+ public function test ()
16+ {
1617 $ organNames = (new Sequence ())->add ('mouth ' )->add ('stomach ' );
1718
1819 $ organ = (new Chain ($ this ))
@@ -33,7 +34,8 @@ public function test() {
3334 $ this ->assertEquals ($ body ->getSystem ('digestive ' )->getOrgan ('mouth ' )->getName (), 'mouth ' );
3435 }
3536
36- public function test2 () {
37+ public function test2 ()
38+ {
3739 $ organNames = (new Sequence ())->add ('mouth ' )->add ('stomach ' );
3840
3941 $ organ = (new Chain ($ this ))
@@ -56,7 +58,8 @@ public function test2() {
5658 }
5759
5860
59- public function test3 () {
61+ public function test3 ()
62+ {
6063 $ organs = (new Options ())
6164 ->add ('mouth ' , Organ::class)
6265 ->add ('stomach ' , Organ::class);
@@ -81,7 +84,8 @@ public function test3() {
8184 $ this ->assertEquals (json_encode (['stomach ' ]), json_encode ($ chain ->getStoredInput ('organ ' )));
8285 }
8386
84- public function test4 () {
87+ public function test4 ()
88+ {
8589 $ this ->expectExceptionMessage ("blah " );
8690
8791 $ system = (new Chain ($ this ))
@@ -94,24 +98,27 @@ public function test4() {
9498 $ body ->getSystem ("blah " );
9599 }
96100
97- public function testNonExistentMethod () {
98- $ this ->expectExceptionMessage ("method blah does not exist in MockChainTest\Anatomy\Organ " );
99- (new Chain ($ this ))
101+ public function testNonExistentMethod ()
102+ {
103+ $ this ->expectExceptionMessage ('Trying to set mock method "blah" with onlyMethods ' );
104+ (new Chain ($ this ))
100105 ->add (Organ::class, 'blah ' , null )
101106 ->getMock ();
102107 }
103108
104- public function testUsingAdddIncorrectly () {
105- $ this ->expectExceptionMessage ("You should use the add method before using addd. " );
106- (new Chain ($ this ))->addd ("hello " );
109+ public function testUsingAdddIncorrectly ()
110+ {
111+ $ this ->expectExceptionMessage ("You should use the add method before using addd. " );
112+ (new Chain ($ this ))->addd ("hello " );
107113 }
108114
109- public function testNonExistentOption () {
115+ public function testNonExistentOption ()
116+ {
110117 $ this ->expectExceptionMessage ('Option digestive does not exist ' );
111118 $ options = new Options ();
112119 $ mock = (new Chain ($ this ))
113120 ->add (Body::class, 'getSystem ' , $ options )
114121 ->getMock ();
115122 $ mock ->getSystem ("digestive " );
116123 }
117- }
124+ }
0 commit comments