Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Utopia Test
# Utopia Tests

A lightweight PHP testing library that provides useful testing utilities and extensions for PHPUnit.

## Installation

```bash
composer require utopia-php/test
composer require utopia-php/tests
```

## Requirements
Expand All @@ -31,7 +31,7 @@ Repeatedly executes a callable until it succeeds or times out. This is useful fo

```php
use PHPUnit\Framework\TestCase;
use Utopia\Test\Extensions\Async;
use Utopia\Tests\Extensions\Async;

class MyTest extends TestCase
{
Expand Down Expand Up @@ -66,7 +66,7 @@ class MyTest extends TestCase
If you need to immediately fail the test without retrying, throw a `Critical` exception:

```php
use Utopia\Test\Extensions\Async\Exceptions\Critical;
use Utopia\Tests\Extensions\Async\Exceptions\Critical;

self::assertEventually(function () use ($connection) {
if ($connection->isClosed()) {
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "utopia-php/test",
"name": "utopia-php/tests",
"description": "Lite & fast micro PHP test framework that is **easy to use**.",
"type": "library",
"keywords": ["php","framework", "upf", "utopia", "test"],
"keywords": ["php","framework", "upf", "utopia", "tests"],
"license": "MIT",
"minimum-stability": "stable",
"scripts": {
Expand All @@ -18,15 +18,15 @@
}
],
"autoload": {
"psr-4": {"Utopia\\Test\\": "src/Test"}
"psr-4": {"Utopia\\Tests\\": "src/Tests"}
},
"require": {
"php": ">=8.3"
},
"require-dev": {
"phpstan/phpstan": "2.0.*",
"phpunit/phpunit": "12.4.*",
"laravel/pint": "1.25.*",
"phpstan/phpstan": "2.0.*"
"laravel/pint": "1.25.*"
},
"config": {
"allow-plugins": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Utopia\Test\Extensions;
namespace Utopia\Tests\Extensions;

use PHPUnit\Framework\Assert;
use Utopia\Test\Extensions\Async\Eventually;
use Utopia\Tests\Extensions\Async\Eventually;

const DEFAULT_TIMEOUT_MS = 10000;
const DEFAULT_WAIT_MS = 500;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Utopia\Test\Extensions\Async;
namespace Utopia\Tests\Extensions\Async;

use PHPUnit\Framework\Constraint\Constraint;
use Utopia\Test\Extensions\Async\Exceptions\Critical;
use Utopia\Tests\Extensions\Async\Exceptions\Critical;

/**
* Constraint that retries a probe callable until it succeeds or times out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Utopia\Test\Extensions\Async\Exceptions;
namespace Utopia\Tests\Extensions\Async\Exceptions;

/**
* Critical exception that should not be retried
Expand Down
4 changes: 2 additions & 2 deletions tests/AsyncTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Tests;

use PHPUnit\Framework\TestCase;
use Utopia\Test\Extensions\Async;
use Utopia\Test\Extensions\Async\Exceptions\Critical;
use Utopia\Tests\Extensions\Async;
use Utopia\Tests\Extensions\Async\Exceptions\Critical;

class AsyncTest extends TestCase
{
Expand Down