Skip to content

Commit

Permalink
Start work moving to Amp v3
Browse files Browse the repository at this point in the history
  • Loading branch information
cspray committed May 31, 2024
1 parent 229f1ef commit a85835e
Show file tree
Hide file tree
Showing 425 changed files with 2,173 additions and 3,590 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Acme\DemoSuites\ErrorConditions\AfterAllAttributeOnNotTestCaseOrTestSuite;

use Cspray\Labrador\AsyncUnit\Attribute\AfterAll;
use Labrador\AsyncUnit\Framework\Attribute\AfterAll;

class BadTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Acme\DemoSuites\ErrorConditions\AfterAllNonStaticMethod;

use Cspray\Labrador\AsyncUnit\Attribute\AfterAll;
use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\AfterAll;
use Labrador\AsyncUnit\Framework\Attribute\Test;
use Labrador\AsyncUnit\Framework\TestCase;

class BadTestCase extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\AfterEachAttributeOnNotTestCaseOrTestSuite;

use Cspray\Labrador\AsyncUnit\Attribute\AfterAll;
use Cspray\Labrador\AsyncUnit\Attribute\AfterEach;
use Labrador\AsyncUnit\Framework\Attribute\AfterAll;
use Labrador\AsyncUnit\Framework\Attribute\AfterEach;

class BadTestCase {

Expand Down
4 changes: 2 additions & 2 deletions acme_src/ErrorConditions/BadNamespaceTest/MyTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTest\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\Test;
use Labrador\AsyncUnit\Framework\TestCase;

class MyTestCase extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestCaseAfterAll\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\AfterAll;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\AfterAll;
use Labrador\AsyncUnit\Framework\TestCase;

class MyTestCase extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestCaseAfterEach\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\AfterEach;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\AfterEach;
use Labrador\AsyncUnit\Framework\TestCase;

class MyTestCase extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestCaseBeforeAll\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\BeforeAll;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\BeforeAll;
use Labrador\AsyncUnit\Framework\TestCase;

class MyTestCase extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestCaseBeforeEach\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\BeforeEach;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\BeforeEach;
use Labrador\AsyncUnit\Framework\TestCase;

class MyTestCase extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestSuiteAfterAll\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\AfterAll;
use Cspray\Labrador\AsyncUnit\TestSuite;
use Labrador\AsyncUnit\Framework\Attribute\AfterAll;
use Labrador\AsyncUnit\Framework\TestSuite;

class MyTestSuite extends TestSuite {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestSuiteAfterEach\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\AfterEach;
use Cspray\Labrador\AsyncUnit\TestSuite;
use Labrador\AsyncUnit\Framework\Attribute\AfterEach;
use Labrador\AsyncUnit\Framework\TestSuite;

class MyTestSuite extends TestSuite {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestSuiteAfterEachTest\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\AfterEachTest;
use Cspray\Labrador\AsyncUnit\TestSuite;
use Labrador\AsyncUnit\Framework\Attribute\AfterEachTest;
use Labrador\AsyncUnit\Framework\TestSuite;

class MyTestSuite extends TestSuite {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestSuiteBeforeAll\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\BeforeAll;
use Cspray\Labrador\AsyncUnit\TestSuite;
use Labrador\AsyncUnit\Framework\Attribute\BeforeAll;
use Labrador\AsyncUnit\Framework\TestSuite;

class MyTestSuite extends TestSuite {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestSuiteBeforeEach\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\BeforeEach;
use Cspray\Labrador\AsyncUnit\TestSuite;
use Labrador\AsyncUnit\Framework\Attribute\BeforeEach;
use Labrador\AsyncUnit\Framework\TestSuite;

class MyTestSuite extends TestSuite {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BadNamespaceTestSuiteBeforeEachTest\IntentionallyBad;

use Cspray\Labrador\AsyncUnit\Attribute\BeforeEachTest;
use Cspray\Labrador\AsyncUnit\TestSuite;
use Labrador\AsyncUnit\Framework\Attribute\BeforeEachTest;
use Labrador\AsyncUnit\Framework\TestSuite;

class MyTestSuite extends TestSuite {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Acme\DemoSuites\ErrorConditions\BeforeAllAttributeOnNotTestCaseOrTestSuite;

use Cspray\Labrador\AsyncUnit\Attribute\BeforeAll;
use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Labrador\AsyncUnit\Framework\Attribute\BeforeAll;
use Labrador\AsyncUnit\Framework\Attribute\Test;

class BadTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Acme\DemoSuites\ErrorConditions\BeforeAllNonStaticMethod;

use Cspray\Labrador\AsyncUnit\Attribute\BeforeAll;
use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\BeforeAll;
use Labrador\AsyncUnit\Framework\Attribute\Test;
use Labrador\AsyncUnit\Framework\TestCase;

class BadTestCase extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Acme\DemoSuites\ErrorConditions\BeforeEachAttributeOnNotTestCaseOrTestSuite;

use Cspray\Labrador\AsyncUnit\Attribute\BeforeAll;
use Cspray\Labrador\AsyncUnit\Attribute\BeforeEach;
use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Labrador\AsyncUnit\Framework\Attribute\BeforeAll;
use Labrador\AsyncUnit\Framework\Attribute\BeforeEach;
use Labrador\AsyncUnit\Framework\Attribute\Test;

class BadTestCase {

Expand Down
2 changes: 1 addition & 1 deletion acme_src/ErrorConditions/NoTestsTestCase/BadTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Acme\DemoSuites\ErrorConditions\NoTestsTestCase;

use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\TestCase;

class BadTestCase extends TestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Acme\DemoSuites\ErrorConditions\TestAttributeOnNotTestCase;

use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Labrador\AsyncUnit\Framework\Attribute\Test;

class BadTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

namespace Acme\DemoSuites\ExplicitTestSuite\AfterAllTestSuiteHook;

use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\Test;
use Labrador\AsyncUnit\Framework\TestCase;

class FirstTestCase extends TestCase {

#[Test]
public function ensureSuiteCounter() : void {
$this->assert()->intEquals(0, $this->testSuite()->getCounter());
$this->assert->intEquals(0, $this->testSuite->getCounter());
}

#[Test]
public function ensureSuiteCounterAgain() : void {
$this->assert()->intEquals(0, $this->testSuite()->getCounter());
$this->assert->intEquals(0, $this->testSuite->getCounter());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Acme\DemoSuites\ExplicitTestSuite\AfterAllTestSuiteHook;

use Cspray\Labrador\AsyncUnit\Attribute\AfterAll;
use Cspray\Labrador\AsyncUnit\Attribute\DefaultTestSuite;
use Cspray\Labrador\AsyncUnit\TestSuite;
use Labrador\AsyncUnit\Framework\Attribute\AfterAll;
use Labrador\AsyncUnit\Framework\Attribute\DefaultTestSuite;
use Labrador\AsyncUnit\Framework\TestSuite;

#[DefaultTestSuite]
class MyTestSuite extends TestSuite {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace Acme\DemoSuites\ExplicitTestSuite\AfterAllTestSuiteHook;

use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\Test;
use Labrador\AsyncUnit\Framework\TestCase;

class SecondTestCase extends TestCase {

#[Test]
public function ensureSuiteCounter() : void {
$this->assert()->intEquals(0, $this->testSuite()->getCounter());
$this->assert->intEquals(0, $this->testSuite->getCounter());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

namespace Acme\DemoSuites\ExplicitTestSuite\AfterEachTestSuiteHook;

use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\Test;
use Labrador\AsyncUnit\Framework\TestCase;

class FirstTestCase extends TestCase {

#[Test]
public function testSomething() : void {
$this->assert()->arrayEquals([], $this->testSuite()->getState());
$this->assert->arrayEquals([], $this->testSuite->getState());
}

#[Test]
public function testSomethingElse() : void {
$this->assert()->arrayEquals([], $this->testSuite()->getState());
$this->assert->arrayEquals([], $this->testSuite->getState());
}

#[Test]
public function testItAgain() : void {
$this->assert()->arrayEquals([], $this->testSuite()->getState());
$this->assert->arrayEquals([], $this->testSuite->getState());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Acme\DemoSuites\ExplicitTestSuite\AfterEachTestSuiteHook;

use Cspray\Labrador\AsyncUnit\Attribute\AfterEach;
use Cspray\Labrador\AsyncUnit\Attribute\DefaultTestSuite;
use Cspray\Labrador\AsyncUnit\TestSuite;
use Labrador\AsyncUnit\Framework\Attribute\AfterEach;
use Labrador\AsyncUnit\Framework\Attribute\DefaultTestSuite;
use Labrador\AsyncUnit\Framework\TestSuite;

#[DefaultTestSuite]
class MyTestSuite extends TestSuite {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace Acme\DemoSuites\ExplicitTestSuite\AfterEachTestSuiteHook;

use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\Test;
use Labrador\AsyncUnit\Framework\TestCase;

class SecondTestCase extends TestCase {

#[Test]
public function ensureIntEquals() : void {
$this->assert()->arrayEquals([], $this->testSuite()->getState());
$this->assert->arrayEquals([], $this->testSuite->getState());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

namespace Acme\DemoSuites\ExplicitTestSuite\AfterEachTestSuiteHook;

use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\Test;
use Labrador\AsyncUnit\Framework\TestCase;

class ThirdTestCase extends TestCase {

#[Test]
public function testFoo() : void {
$this->assert()->arrayEquals([], $this->testSuite()->getState());
$this->assert->arrayEquals([], $this->testSuite->getState());
}

#[Test]
public function testBar() : void {
$this->assert()->arrayEquals([], $this->testSuite()->getState());
$this->assert->arrayEquals([], $this->testSuite->getState());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

namespace Acme\DemoSuites\ExplicitTestSuite\AfterEachTestTestSuiteHook;

use Cspray\Labrador\AsyncUnit\Attribute\Test;
use Cspray\Labrador\AsyncUnit\TestCase;
use Labrador\AsyncUnit\Framework\Attribute\Test;
use Labrador\AsyncUnit\Framework\TestCase;

class FirstTestCase extends TestCase {

#[Test]
public function testSomething() : void {
$this->assert()->arrayEquals([], $this->testSuite()->getState());
$this->assert->arrayEquals([], $this->testSuite->getState());
}

#[Test]
public function testSomethingElse() : void {
$this->assert()->arrayEquals([], $this->testSuite()->getState());
$this->assert->arrayEquals([], $this->testSuite->getState());
}

#[Test]
public function testItAgain() : void {
$this->assert()->arrayEquals([], $this->testSuite()->getState());
$this->assert->arrayEquals([], $this->testSuite->getState());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Acme\DemoSuites\ExplicitTestSuite\AfterEachTestTestSuiteHook;

use Cspray\Labrador\AsyncUnit\Attribute\AfterEachTest;
use Cspray\Labrador\AsyncUnit\Attribute\DefaultTestSuite;
use Cspray\Labrador\AsyncUnit\TestSuite;
use Labrador\AsyncUnit\Framework\Attribute\AfterEachTest;
use Labrador\AsyncUnit\Framework\Attribute\DefaultTestSuite;
use Labrador\AsyncUnit\Framework\TestSuite;

#[DefaultTestSuite]
class MyTestSuite extends TestSuite {
Expand Down
Loading

0 comments on commit a85835e

Please sign in to comment.