Esempio n. 1
0
 public function testSetEntityName()
 {
     $entityName = 'TestEntity';
     $dataConverter = $this->getMock('Oro\\Bundle\\ImportExportBundle\\Tests\\Unit\\Converter\\Stub\\EntityNameAwareDataConverter');
     $dataConverter->expects($this->once())->method('setEntityName')->with($entityName);
     $this->processor->setDataConverter($dataConverter);
     $this->processor->setEntityName($entityName);
     $this->assertAttributeEquals($entityName, 'entityName', $this->processor);
 }
 public function testSetImportExportContextFailsWithInvalidQueryBuilder()
 {
     $context = $this->getMock('Oro\\Bundle\\ImportExportBundle\\Context\\ContextInterface');
     $context->expects($this->once())->method('getOption')->will($this->returnValue(new \stdClass()));
     $dataConverter = $this->getMock('Oro\\Bundle\\ImportExportBundle\\Tests\\Unit\\Converter\\Stub\\QueryBuilderAwareDataConverter');
     $dataConverter->expects($this->never())->method($this->anything());
     $this->processor->setDataConverter($dataConverter);
     $this->processor->setImportExportContext($context);
 }