You are here

public function LingotekApiUnitTest::testGetProjects in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 8 tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  2. 8.2 tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  3. 4.0.x tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  4. 3.0.x tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  5. 3.1.x tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  6. 3.2.x tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  7. 3.3.x tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  8. 3.4.x tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  9. 3.5.x tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  10. 3.7.x tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()
  11. 3.8.x tests/src/Unit/Remote/LingotekApiUnitTest.php \Drupal\Tests\lingotek\Unit\Remote\LingotekApiUnitTest::testGetProjects()

@covers ::getProjects

File

tests/src/Unit/Remote/LingotekApiUnitTest.php, line 243

Class

LingotekApiUnitTest
@coversDefaultClass \Drupal\lingotek\Remote\LingotekApi @group lingotek @preserveGlobalState disabled

Namespace

Drupal\Tests\lingotek\Unit\Remote

Code

public function testGetProjects() {

  // Ensure that the limit and the community_id are set.
  $response = $this
    ->getMockBuilder(ResponseInterface::class)
    ->disableOriginalConstructor()
    ->getMock();
  $this->client
    ->expects($this
    ->once())
    ->method('get')
    ->with('/api/project', [
    'community_id' => 'my_community_id',
    'limit' => 1000,
  ])
    ->will($this
    ->returnValue($response));
  $this->lingotek_api
    ->getProjects('my_community_id');
}