mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-30 03:30:14 +02:00
cs Adapter
This commit is contained in:
@@ -14,7 +14,9 @@ namespace DesignPatterns\Adapter;
|
|||||||
*/
|
*/
|
||||||
class EBookAdapter implements PaperBookInterface
|
class EBookAdapter implements PaperBookInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var EBookInterface
|
||||||
|
*/
|
||||||
protected $eBook;
|
protected $eBook;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -17,7 +17,9 @@ use DesignPatterns\Adapter\Book;
|
|||||||
*/
|
*/
|
||||||
class AdapterTest extends \PHPUnit_Framework_TestCase
|
class AdapterTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function getBook()
|
public function getBook()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
@@ -31,6 +33,8 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
|
|||||||
* This client only knows paper book but surprise, surprise, the second book
|
* This client only knows paper book but surprise, surprise, the second book
|
||||||
* is in fact an electronic book, but both work the same way
|
* is in fact an electronic book, but both work the same way
|
||||||
*
|
*
|
||||||
|
* @param PaperBookInterface $book
|
||||||
|
*
|
||||||
* @dataProvider getBook
|
* @dataProvider getBook
|
||||||
*/
|
*/
|
||||||
public function test_I_am_an_old_Client(PaperBookInterface $book)
|
public function test_I_am_an_old_Client(PaperBookInterface $book)
|
||||||
|
Reference in New Issue
Block a user