<?php
namespace Tasks\tests;
/*
require_once '../tasks/task3/Lesson.php';
require_once '../tasks/task3/Grammar.php';
require_once '../tasks/task3/Speaking.php';
require_once '../Tasks/task3/Strategy/CostStrategy.php';
require_once '../tasks/task3/Strategy/TimeStrategy.php';
require_once '../tasks/task3/Strategy/FixedStrategy.php';
*/
use Tasks\task3\Grammar;
use Tasks\task3\Speaking;
use Tasks\task3\Strategy\FixedStrategy;
use Tasks\task3\Strategy\TimeStrategy;
class TestLessons extends \PHPUnit_Framework_TestCase
{
public function testLessonsGrammarFixedCostGood()
{
for ($i = 0; $i < 2; $i++) {
$grammar = new Grammar(2, new FixedStrategy());
$this->assertEquals(600, $grammar->cost());
}
}
public function testLessonsSpeakingTimedCostGood()
{
for ($i = 0; $i < 2; $i++) {
$spaeking = new Speaking(3, new TimeStrategy());
$this->assertEquals(900, $spaeking->cost());
}
}
public function testLessonsGrammarTimedCostBad()
{
for ($i = 0; $i < 2; $i++) {
$grammar = new Grammar(3, new TimeStrategy());
$this->assertNotEquals(900, $grammar->cost());
}
}
}
Когда запускаю phpunit TestLessons.php пишет Class Tasks\task3\Grammar not found, в композере psr-0 норм прописан, пытался phpunit --bootstrap path_to_autoload, пытался прямо в тесты рекуаер подключить, все тоже самое