CRUDlexTests\MySQLDataTest::testDeleteFiles PHP Method

testDeleteFiles() public method

public testDeleteFiles ( )
    public function testDeleteFiles()
    {
        $entityLibrary = $this->dataLibrary->createEmpty();
        $entityLibrary->set('name', 'lib');
        $this->dataLibrary->create($entityLibrary);
        $entityBook = $this->dataBook->createEmpty();
        $entityBook->set('title', 'title');
        $entityBook->set('author', 'author');
        $entityBook->set('pages', 111);
        $entityBook->set('library', $entityLibrary->get('id'));
        $this->dataBook->create($entityBook);
        $fileProcessorHandle = TestDBSetup::getFileProcessorHandle();
        $this->dataBook->deleteFiles($entityBook, 'book');
        $fileProcessorHandle->createFile->never()->called();
        $fileProcessorHandle->updateFile->never()->called();
        $fileProcessorHandle->deleteFile->once()->called();
        $fileProcessorHandle->renderFile->never()->called();
    }