Skip to content

Commit

Permalink
WIP - Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatume committed Jul 31, 2024
1 parent 4c7adda commit 4a6e2e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,9 @@ jobs:
test:
strategy:
matrix:
php_version: [ '8.0', '8.1', '8.2', '8.3' ]
php_version: [ '8.2']
suite:
- acceptance
- climodule
- functional
- muloader
- unit
- webdriver
- wpcli_module
- wploader_multisite
- wploader_wpdb_interaction
- wploadersuite
name: ${{ matrix.suite }} php@${{ matrix.php_version }}
runs-on: ubuntu-22.04
steps:
Expand Down Expand Up @@ -87,7 +78,7 @@ jobs:

- name: Run tests
id: test
run: vendor/bin/codecept run ${{ matrix.suite }}
run: vendor/bin/codecept run tests/unit/lucatume/WPBrowser/Module/WPLoaderTest.php:should_not_throw_when_load_only_true_and_using_db_module

- name: Upload Artifacts
uses: actions/upload-artifact@v2
Expand Down
10 changes: 7 additions & 3 deletions tests/_support/Traits/LoopIsolation.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ protected function assertInIsolation(
}

if ($result->getExitCode() !== 0) {
codecept_debug('STDOUT: ' . $result->getStdoutBuffer());
codecept_debug('STDERR: ' . $result->getStderrBuffer());
$this->fail('Loop execution failed with exit code ' . $result->getExitCode());
$failureMessage = sprintf(
"\nEXIT CODE: %s\n\nSTDOUT\n%s\n\nSTDERR\n%s\n",
$result->getExitCode(),
$result->getStdoutBuffer(),
$result->getStderrBuffer()
);
$this->fail($failureMessage);
}

return $returnValue;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/lucatume/WPBrowser/Module/WPLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,9 @@ public function should_create_the_database_if_it_does_not_exist(): void

public function dbModuleCompatDataProvider(): Generator
{
yield 'MysqlDatabase' => ['MysqlDatabase', MysqlDatabase::class];
// yield 'MysqlDatabase' => ['MysqlDatabase', MysqlDatabase::class];
yield 'WPDb' => ['WPDb', WPDb::class];
yield WPDb::class => [WPDb::class, WPDb::class];
// yield WPDb::class => [WPDb::class, WPDb::class];
}

/**
Expand Down

0 comments on commit 4a6e2e2

Please sign in to comment.