public function testCanTurnPageOnKindleLikeInANormalBook() { $kindle = new Kindle(); $book = new EBookAdapter($kindle); $book->open(); $book->turnPage(); $this->assertEquals(2, $book->getPage()); }
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(); }