CRUDlexTests\MySQLDataTest::testRenderFile PHP Method

testRenderFile() public method

public testRenderFile ( )
    public function testRenderFile()
    {
        $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->renderFile($entityBook, 'book', 'cover');
        $fileProcessorHandle->createFile->never()->called();
        $fileProcessorHandle->updateFile->never()->called();
        $fileProcessorHandle->deleteFile->never()->called();
        $fileProcessorHandle->renderFile->once()->called();
    }