<?php

/**
 * Test class for /src/sys/common.php
 */
class commonTest extends UnitTestCase {

	function __construct()
	{
		parent::__construct('Common.php Tests');
	}
	
	function setUp()
	{
		$this->empty = array();
		$this->object = new miniMVC\MM();
		$this->array_like = new miniMVC\MM(['foo' => 'bar']);
	}
	
	function tearDown()
	{
		unset($this->empty);
		unset($this->object);
		unset($this->array_like);
	}
	
	function testEmptyArrayNotLikeArray()
	{
		// Empty is not array like
		$this->assertFalse(miniMVC\is_like_array($this->empty));
	}
	
	function testEmptyObjectIsLikeArray()
	{
		// Empty object is array like - because objects are truthy
		$this->assertTrue(miniMVC\is_like_array($this->object));
	}

}