public function sendReceive_getUserProjects($username, $password)
 {
     return SendReceiveCommands::getUserProjects($username, $password);
 }
 public function testGetUserProjects_TwoSRProjectsOneExistingLFProject_ProjectExists()
 {
     $username = '******';
     $password = '******';
     $client = new Client();
     $body = Stream::factory('[{"identifier": "identifier", "name": "name2", "repository": "", "role": ""}, ' . '{"identifier": "sr_id", "name": "sr_name", "repository": "", "role": ""}]');
     $response = new Response(200, ['Content-Type' => 'application/json'], $body);
     $mock = new Mock([$response]);
     $client->getEmitter()->attach($mock);
     $result = SendReceiveCommands::getUserProjects($username, $password, $client);
     $this->assertTrue($result['isKnownUser']);
     $this->assertTrue($result['hasValidCredentials']);
     $this->assertCount(2, $result['projects']);
     $this->assertEquals(false, $result['projects'][0]['isLinked']);
     $this->assertTrue($result['projects'][1]['isLinked']);
     $this->assertEquals('sr_name', $result['projects'][1]['name']);
 }