Skip to content

Commit

Permalink
Adjust test
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHash committed Jul 14, 2020
1 parent b584fce commit 2bd3482
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/FromToNativeTest.php
Expand Up @@ -8,7 +8,7 @@

namespace Daikon\Tests\Interop;

use Daikon\Interop\AssertionFailedException;
use Daikon\Interop\InvalidArgumentException;
use Daikon\Tests\Interop\Fixture\AnnotatedValue;
use Daikon\Tests\Interop\Fixture\MockValue;
use PHPUnit\Framework\TestCase;
Expand All @@ -28,28 +28,28 @@ public function testMakeEmpty(): void

public function testFromNativeWithNull(): void
{
$this->expectException(AssertionFailedException::class);
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('This trait only works with array state.');
MockValue::fromNative(null);
}

public function testInferredFromNativeWithNull(): void
{
$this->expectException(AssertionFailedException::class);
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('This trait only works with array state.');
AnnotatedValue::fromNative(null);
}

public function testFromNativeWithScalar(): void
{
$this->expectException(AssertionFailedException::class);
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('This trait only works with array state.');
MockValue::fromNative('test');
}

public function testInferredFromNativeWithScalar(): void
{
$this->expectException(AssertionFailedException::class);
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('This trait only works with array state.');
AnnotatedValue::fromNative('test');
}
Expand All @@ -75,14 +75,14 @@ public function testFromNativeWithInvalidType(): void

public function testInferredFromNativeWithInvalidType(): void
{
$this->expectException(AssertionFailedException::class);
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('This trait only works with array state.');
AnnotatedValue::fromNative(['mockValue' => 123]);
}

public function testInferredFromNativeWithNullValueState(): void
{
$this->expectException(AssertionFailedException::class);
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('This trait only works with array state.');
AnnotatedValue::fromNative(['mockValue' => null]);
}
Expand Down

0 comments on commit 2bd3482

Please sign in to comment.