예제 #1
0
 public function setUp()
 {
     $this->connection = $this->createMock(CsvDataGateway::class);
     $this->connection->expects($this->any())->method('getAll')->with('articles')->willReturn(array_values($this->articles));
     parent::setUp();
     $this->dataMapper = new CsvDataMapper($this->connection, Article::class, 'articles', $this->entityRegistry);
 }
 /**
  * delete() delegates call to connection
  */
 public function testDelete()
 {
     $this->connection->expects($this->once())->method('delete')->willReturn(1);
     $this->dataMapper->delete(new Article());
 }