<?php

class AdminTest extends PHPUnit_Framework_TestCase
{
	public function testAdminPassword()
	{
		$admin = new \Entity\Admin();
		$admin->setPassword("test");
		$this->assertTrue($admin->checkPassword("test"));
		$this->assertFalse($admin->checkPassword("test2"));
		$this->assertNotEquals("test", $admin->password);
		$this->assertEquals(60, strlen($admin->password));
		$admin->password = "test2";
		$this->assertFalse($admin->checkPassword("test"));
		$this->assertTrue($admin->checkPassword("test2"));
		$this->assertEquals(60, strlen($admin->password));
		$this->assertNotEquals("test2", $admin->password);
	}
}

