Code style and test updates.
This commit is contained in:
parent
75257caee2
commit
1d7ed8038a
|
@ -112,7 +112,7 @@ class RemotesController extends AbstractStationApiCrudController
|
|||
|
||||
$returnArray = $this->toArray($record);
|
||||
|
||||
$return = new Entity\Api\StationRemote;
|
||||
$return = new Entity\Api\StationRemote();
|
||||
$return->fromParentObject($returnArray);
|
||||
|
||||
$isInternal = ('true' === $request->getParam('internal', 'false'));
|
||||
|
|
|
@ -11,6 +11,7 @@ use GuzzleHttp\Client;
|
|||
use Monolog\Logger;
|
||||
use Psr\SimpleCache\CacheInterface;
|
||||
use RuntimeException;
|
||||
|
||||
use const JSON_PRETTY_PRINT;
|
||||
|
||||
class LocalWebhookHandler
|
||||
|
|
|
@ -8,30 +8,11 @@ class Station_RemoteRelaysCest extends CestAbstract
|
|||
*/
|
||||
public function editRemoteRelays(FunctionalTester $I): void
|
||||
{
|
||||
$I->wantTo('Create a station remote relay.');
|
||||
|
||||
$testStation = $this->getTestStation();
|
||||
$station_id = $testStation->getId();
|
||||
|
||||
$I->amOnPage('/station/' . $station_id . '/remotes');
|
||||
|
||||
$I->see('Remote Relays');
|
||||
$I->click('Add Remote Relay', '#content');
|
||||
|
||||
$I->submitForm('.form', [
|
||||
'type' => 'shoutcast1',
|
||||
'url' => 'http://test.local',
|
||||
'display_name' => 'Test Relay',
|
||||
]);
|
||||
|
||||
$I->seeCurrentUrlEquals('/station/' . $station_id . '/remotes');
|
||||
|
||||
$I->see('Test Relay');
|
||||
|
||||
$I->click(\Codeception\Util\Locator::lastElement('.btn-danger'));
|
||||
|
||||
$I->seeCurrentUrlEquals('/station/' . $station_id . '/remotes');
|
||||
|
||||
$I->dontSee('Test Relay');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue