public function testDeleteIncludesRecordType() { $data = ['id' => 'a-unique-id', 'file_name' => 'asdf.txt', 'path' => 'asdf/fdsa', 'content_type' => 'text/plain', 'size' => 123123]; $entity = new GenericFileEntity($data); $this->mapper->delete($entity); $sql = $this->getSqlString(); $this->assertRegExp('/`id` = \'a-unique-id\'/', $sql, 'ID filtered in delete statement'); $this->assertRegExp('/`record_type` = \'generic\'/', $sql, 'Record Type not filtered in delete statement'); }
public function withFileInserted() { $this->mapper->expects($this->once())->method('insert')->willReturnArgument(0); }