/** * test toArray */ public function testToArray() { $this->product->setModel('testmodel'); $expectedArray = array('model' => 'testmodel', 'title' => null); $this->assertEquals($expectedArray, $this->product->toArray()); $this->product->setTitle('testtitle'); $expectedArray = array('model' => 'testmodel', 'title' => 'testtitle'); $this->assertEquals($expectedArray, $this->product->toArray()); }