示例#1
0
 /**
  * @test
  */
 public function shouldFilterAttributesForInsert()
 {
     //given
     $product = new Product(array('name' => 'Sport'));
     $product->junk = 'junk';
     // when
     $id = $product->insert();
     //insert with junk would fail
     // then
     $actual = Product::findById($id);
     $this->assertEquals('Sport', $actual->name);
 }