コード例 #1
0
 public function testLibrary()
 {
     $book = new OldBooksAdapter(new OldBook());
     $library = new newBooksLibrary();
     $this->assertEquals('Twenty Thousand Leagues Under the Sea by Jules Verne', $library->acceptBook($book));
 }
コード例 #2
0
<?php

require "library.php";
$book = new OldBooksAdapter(new OldBook());
$library = new newBooksLibrary();
echo $library->acceptBook($book);