-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from utopia-php/main
sync main
- Loading branch information
Showing
17 changed files
with
173 additions
and
816 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "Tests" | ||
|
||
on: [ pull_request ] | ||
jobs: | ||
test: | ||
name: Tests ${{ matrix.php-versions }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: ['8.0', '8.1', '8.2', '8.3', 'nightly'] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Compose install | ||
run: composer install --ignore-platform-reqs | ||
|
||
- name: Run tests | ||
run: composer test |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Utopia\Tests; | ||
|
||
use Utopia\Response; | ||
|
||
class MockResponse extends Response | ||
{ | ||
public function end(string $content = null): void | ||
{ | ||
if (! is_null($content)) { | ||
echo $content; | ||
} | ||
} | ||
|
||
public function send(string $body = ''): void | ||
{ | ||
$this->sent = true; | ||
$this->end($body); | ||
} | ||
|
||
public function chunk(string $body = '', bool $end = false): void | ||
{ | ||
if ($end) { | ||
$this->sent = true; | ||
} | ||
$this->write($body); | ||
if ($end) { | ||
$this->end(); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.