jaroslavtyc/drd-plus-health

View on GitHub
tests/Health/PointOfWoundTest.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php declare(strict_types=1);

namespace DrdPlus\Tests\Health;

use DrdPlus\Health\PointOfWound;
use DrdPlus\Health\Wound;
use Granam\TestWithMockery\TestWithMockery;

class PointOfWoundTest extends TestWithMockery
{
    /**
     * @test
     */
    public function I_can_use_it(): void
    {
        $pointOfWound = new PointOfWound($wound = $this->createWound());
        self::assertSame(1, $pointOfWound->getValue());
        self::assertSame($wound, $pointOfWound->getWound());
        self::assertSame('1', (string)$pointOfWound);
    }

    /**
     * @return \Mockery\MockInterface|Wound
     */
    private function createWound(): Wound
    {
        return $this->mockery(Wound::class);
    }
}