public function testCreate() { $this->assertEquals('painted to black', BMWFactory::create('black')); $this->assertEquals('painted to red', BMWFactory::create('red')); }
<?php require_once "paint.php"; //besides color, you can pass array with many options $myBlackBMW = BMWFactory::create('black'); echo $myBlackBMW;