AssertionCounter.php 430 Bytes
Newer Older
Marojahan Sigiro committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php
namespace Codeception\Test\Feature;

trait AssertionCounter
{
    protected $numAssertions = 0;

    public function getNumAssertions()
    {
        return $this->numAssertions;
    }

    protected function assertionCounterStart()
    {
        \PHPUnit_Framework_Assert::resetCount();
    }

    protected function assertionCounterEnd()
    {
        $this->numAssertions = \PHPUnit_Framework_Assert::getCount();
    }
}