<?php

/**
 * Test case class.
 *
 * @package FormEnhancer
 */

namespace FormEnhancer\Tests;

use Mockery;
use WP_Mock;
use WP_Mock\Tools\TestCase as ToolsTestCase;

/**
 * Class TestCase
 */
class TestCase extends ToolsTestCase
{
	/**
	 * Setup.
	 *
	 * @return void
	 *
	 * @throws Exception
	 */
	public function setUp(): void
	{
		parent::setUp();
		WP_Mock::setUp();
	}

	/**
	 * Tear down.
	 *
	 * @return void
	 */
	public function tearDown(): void
	{
		WP_Mock::tearDown();
		parent::tearDown();
	}

	/**
	 * Assert post conditions for Mockery & WP_Mock.
	 *
	 * @return void
	 */
	public function assertPostConditions(): void
	{
		$this->addToAssertionCount(Mockery::getContainer()->mockery_getExpectationCount());
	}
}
