Skip to content

Commit

Permalink
Update tests, separate for individual classes
Browse files Browse the repository at this point in the history
  • Loading branch information
jorikfon committed Nov 8, 2024
1 parent e0dde92 commit e85c9e8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@
"sentry/sdk": "^3.3.0"
},
"require-dev": {
"roave/security-advisories": "dev-master",
"roave/security-advisories": "dev-master",
"phpunit/phpunit-selenium": "^9.0",
"php-webdriver/webdriver": "^1.14.0",
"browserstack/browserstack-local": "^v1.1.0",
"phpunit/phpunit": "^9.0",
"phalcon/ide-stubs": "^5.0.0",
"squizlabs/php_codesniffer": "*"
"squizlabs/php_codesniffer": "*",
"brianium/paratest": "*"
},
"autoload": {
"psr-4": {
Expand Down
26 changes: 13 additions & 13 deletions tests/AdminCabinet/Lib/BrowserStackTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,22 @@ private static function initializeTestState(): void
protected function setUp(): void
{
parent::setUp();
$this->updateTestSessionName();
// $this->updateTestSessionName();
$this->prepareTestEnvironment();
}

/**
* Update test session name in BrowserStack
*
* @throws GuzzleException
*/
private function updateTestSessionName(): void
{
$sessionId = self::$driver->getSessionID();
self::$httpClient->request('PUT', "/automate/sessions/{$sessionId}.json", [
'json' => ['name' => $this->getName(true)]
]);
}
// /**
// * Update test session name in BrowserStack
// *
// * @throws GuzzleException
// */
// private function updateTestSessionName(): void
// {
// $sessionId = self::$driver->getSessionID();
// self::$httpClient->request('PUT', "/automate/sessions/{$sessionId}.json", [
// 'json' => ['name' => $this->getName(true)]
// ]);
// }

/**
* Prepare test environment
Expand Down
3 changes: 3 additions & 0 deletions tests/AdminCabinet/Lib/globals.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
if (!file_exists($config_file)) {
$config_file = '../config/local.conf.json';
}



$GLOBALS['CONFIG'] = json_decode(file_get_contents($config_file), true);

$GLOBALS['BROWSERSTACK_USERNAME'] = getenv('BROWSERSTACK_USERNAME');
Expand Down
4 changes: 2 additions & 2 deletions tests/AdminCabinet/Tests/DeleteProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public function testDeleteProvider(array $params): void
public function additionProvider(): array
{
$params = [];
$params['mango.delete'] = SIPProviderDataFactory::getSIPProviderData('mango.delete');
$params['voxlink.iax.delete'] = IAXProviderDataFactory::getIAXProviderData('voxlink.iax.delete');
$params['mango.delete'] = [SIPProviderDataFactory::getSIPProviderData('mango.delete')];
$params['voxlink.iax.delete'] = [IAXProviderDataFactory::getIAXProviderData('voxlink.iax.delete')];
return $params;
}
}
2 changes: 1 addition & 1 deletion tests/AdminCabinet/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</testsuite>
</testsuites>
<!-- Добавляем конфигурацию параллельного выполнения -->
<parallel processIsolation="true" maxProcess="5" maxBatchSize="5">
<parallel processIsolation="true" maxProcess="3" maxBatchSize="3">
<exclude>
<group>disabled</group>
</exclude>
Expand Down

0 comments on commit e85c9e8

Please sign in to comment.