PHP Classes

File: tests/src/PriceCalculator/BaseTest.php

Recommend this page to a friend!
  Classes of Sergii Pryz   PHP Price Calculator   tests/src/PriceCalculator/BaseTest.php   Download  
File: tests/src/PriceCalculator/BaseTest.php
Role: Unit test script
Content type: text/plain
Description: Class source
Class: PHP Price Calculator
Calculate prices using arbitrary precision math
Author: By
Last change:
Date: 9 years ago
Size: 652 bytes
 

Contents

Class file image Download
<?php
/**
 * Base PriceCalculator UnitTest
 *
 * @link https://github.com/picamator/PriceCalculator
 * @license http://opensource.org/licenses/BSD-3-Clause New BSD License
 */

namespace PriceCalculator;

class
BaseTest extends \PHPUnit_Framework_TestCase
{
   
/**
     * Assert check equals arrays
     *
     * @param array $expected
     * @param array $actual
     */
   
protected function assertEqualArrays(array $expected, array $actual)
    {
        foreach (
$expected as $key => $value) {
           
$this->assertTrue(array_key_exists($key, $actual));
           
$this->assertEquals($value, $actual[$key]);
        }
    }
}