File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public function testFilm()
1111 $ film = $ imdb ->film ('tt0816692 ' );
1212
1313 $ this ->assertEquals ('tt0816692 ' , $ film ['id ' ]);
14- $ this ->assertEquals ('Interstellar ' , $ film ['title ' ]);
14+ $ this ->assertEquals ('Interstellar ' , $ film ['title ' ]);
1515 $ this ->assertEquals ('2h 49min ' , $ film ['length ' ]);
1616 $ this ->assertEquals ('2014 ' , $ film ['year ' ]);
1717 }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use PHPUnit \Framework \TestCase ;
4+ use hmerritt \Response ;
5+
6+ class ResponseTest extends TestCase {
7+
8+ public function testAddFunction ()
9+ {
10+ $ response = new Response ;
11+ $ response ->add ("id " , "tt0816692 " );
12+ $ response ->add ("title " , "Interstellar " );
13+
14+ $ expected = [
15+ "id " => "tt0816692 " ,
16+ "title " => "Interstellar "
17+ ];
18+
19+ $ this ->assertEquals ($ expected , $ response ->store );
20+ }
21+
22+ public function testGetFunction ()
23+ {
24+ $ response = new Response ;
25+ $ response ->add ("title " , "Interstellar " );
26+
27+ $ this ->assertEquals ("Interstellar " , $ response ->get ("title " ));
28+ }
29+
30+ }
You can’t perform that action at this time.
0 commit comments