public function LingotekCliServiceTest::testCheckUploadInvalidEntityId in Lingotek Translation 3.0.x
Same name and namespace in other branches
- 8.2 tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
- 4.0.x tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
- 3.1.x tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
- 3.2.x tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
- 3.3.x tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
- 3.4.x tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
- 3.5.x tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
- 3.6.x tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
- 3.7.x tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
- 3.8.x tests/src/Unit/Cli/LingotekCliServiceTest.php \Drupal\Tests\lingotek\Unit\Cli\LingotekCliServiceTest::testCheckUploadInvalidEntityId()
File
- tests/
src/ Unit/ Cli/ LingotekCliServiceTest.php, line 167
Class
- LingotekCliServiceTest
- @coversDefaultClass \Drupal\lingotek\Cli\LingotekCliService @group lingotek @preserveGlobalState disabled
Namespace
Drupal\Tests\lingotek\Unit\CliCode
public function testCheckUploadInvalidEntityId() {
$entityStorage = $this
->createMock(EntityStorageInterface::class);
$this->entityTypeManager
->expects($this
->once())
->method('hasDefinition')
->with('xxxx')
->willReturn(TRUE);
$this->entityTypeManager
->expects($this
->once())
->method('getStorage')
->with('xxxx')
->willReturn($entityStorage);
$this->logger
->expects($this
->once())
->method('error');
$upload = $this->cliService
->checkUpload('xxxx', 1);
$this
->assertEquals($this->cliService::COMMAND_ERROR_ENTITY_NOT_FOUND, $upload);
}