You've already forked gitea-composer-upload-action
update MapperTypeTest
This commit is contained in:
@@ -6,6 +6,7 @@ namespace App\Casting;
|
|||||||
|
|
||||||
use App\Casting\Type\IntegerType;
|
use App\Casting\Type\IntegerType;
|
||||||
use App\Casting\Type\StringType;
|
use App\Casting\Type\StringType;
|
||||||
|
use App\Exception\Casting\TypeNotFountException;
|
||||||
use PHPUnit\Framework\Attributes\CoversClass;
|
use PHPUnit\Framework\Attributes\CoversClass;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
@@ -17,8 +18,8 @@ final class MapperTypeTest extends TestCase
|
|||||||
$type = (new MapperType(MapperType::STRING))->create('value');
|
$type = (new MapperType(MapperType::STRING))->create('value');
|
||||||
|
|
||||||
self::assertInstanceOf(
|
self::assertInstanceOf(
|
||||||
$type,
|
|
||||||
StringType::class,
|
StringType::class,
|
||||||
|
$type,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,8 +28,8 @@ final class MapperTypeTest extends TestCase
|
|||||||
$type = (new MapperType(MapperType::INTEGER))->create(1);
|
$type = (new MapperType(MapperType::INTEGER))->create(1);
|
||||||
|
|
||||||
self::assertInstanceOf(
|
self::assertInstanceOf(
|
||||||
$type,
|
|
||||||
IntegerType::class,
|
IntegerType::class,
|
||||||
|
$type,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,8 +38,15 @@ final class MapperTypeTest extends TestCase
|
|||||||
$type = (new MapperType(MapperType::INT))->create(1);
|
$type = (new MapperType(MapperType::INT))->create(1);
|
||||||
|
|
||||||
self::assertInstanceOf(
|
self::assertInstanceOf(
|
||||||
$type,
|
|
||||||
IntegerType::class,
|
IntegerType::class,
|
||||||
|
$type,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testTypeNotFountException(): void
|
||||||
|
{
|
||||||
|
self::expectException(TypeNotFountException::class);
|
||||||
|
|
||||||
|
(new MapperType('type-exception'))->create('value');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user