public function testCanTurnPageOnKindleLikeInANormalBook()
 {
     $kindle = new Kindle();
     $book = new EBookAdapter($kindle);
     $book->open();
     $book->turnPage();
     $this->assertEquals(2, $book->getPage());
 }
예제 #2
0
 public function test()
 {
     $book = new Book();
     $book->open();
     $book->turnPage();
     $book->turnPage();
     $book->turnPage();
     $book->turnPage();
     $book->turnPage();
     $kindle = new Kindle();
     $kindle->pressStart();
     $kindle->pressNext();
     $kindle->pressNext();
     $kindle->pressNext();
     $kindleAdapter = new EBookAdapter($kindle);
     $kindleAdapter->open();
     $kindleAdapter->turnPage();
     $kindleAdapter->turnPage();
     $kindleAdapter->turnPage();
     $kindleAdapter->turnPage();
     $kindleAdapter->turnPage();
     $kindleAdapter->turnPage();
 }