public function __toString()
{
$attributes = print_r($this->expectedAttributes, true);
return get_class($this->expected) . " with attributes({$attributes})";
}
/** * @test */ public function shouldReturnDescription() { //given $model = new Product(array('name' => 'product1')); $matcher = new ModelAttributesMatcher($model); //when $description = $matcher->__toString(); //then $attributes = print_r($model->attributes(), true); $this->assertEquals("Application\\Model\\Test\\Product with attributes({$attributes})", $description); }