Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sixlive committed Sep 2, 2024
1 parent 346a402 commit 5a2fd2e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ composer.lock
vendor/
coverage/
.php-cs-fixer.cache
.phpunit.result.cache
.phpunit*.cache
10 changes: 6 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/coverage"/>
Expand All @@ -18,4 +15,9 @@
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
17 changes: 6 additions & 11 deletions tests/AssertResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public function setUp(): void
});
}

/** @test */
public function valid_schema_passes_as_json()
public function test_valid_schema_passes_as_json()
{
$schema = [
'type' => 'object',
Expand All @@ -36,8 +35,7 @@ public function valid_schema_passes_as_json()
$this->get('foo')->assertJsonSchema(json_encode($schema));
}

/** @test */
public function valid_schema_passes_as_array()
public function test_valid_schema_passes_as_array()
{
$schema = [
'type' => 'object',
Expand All @@ -54,15 +52,13 @@ public function valid_schema_passes_as_array()
$this->get('foo')->assertJsonSchema($schema);
}

/** @test */
public function valid_schema_passes_as_file_path()
public function test_valid_schema_passes_as_file_path()
{
$this->get('foo')
->assertJsonSchema(__DIR__.'/Support/Schemas/foo.json');
->assertJsonSchema(__DIR__.'/Support/Schemas/foo.json');
}

/** @test */
public function invalid_schema_fails_with_message()
public function test_invalid_schema_fails_with_message()
{
$this->expectException(AssertionFailedError::class);

Expand All @@ -81,8 +77,7 @@ public function invalid_schema_fails_with_message()
$this->get('foo')->assertJsonSchema(json_encode($schema));
}

/** @test */
public function valid_schema_passes_as_config_path()
public function test_valid_schema_passes_as_config_path()
{
$this->get('foo')->assertJsonSchema('foo');
}
Expand Down

0 comments on commit 5a2fd2e

Please sign in to comment.