Skip to content

Commit

Permalink
Order the test dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
seba-aln committed Jun 18, 2024
1 parent 839fd59 commit e8b13f2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/integrational/FilesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace PubNubTests\integrational;

use PHPUnit\Framework\Attributes\Depends;
use PubNubTestCase;

class FilesTest extends PubNubTestCase
Expand All @@ -19,6 +20,7 @@ public function testEmptyFileList()
$this->assertCount(0, $response->getData());
}

#[Depends('testEmptyFileList')]
public function testSendTextFile()
{
$file = fopen($this->textFilePath, "r");
Expand All @@ -34,6 +36,7 @@ public function testSendTextFile()
$this->assertNotEmpty($response->getTimestamp());
}

#[Depends('testEmptyFileList')]
public function testSendBinaryFile()
{
$file = fopen($this->binaryFilePath, "r");
Expand All @@ -49,6 +52,8 @@ public function testSendBinaryFile()
$this->assertNotEmpty($response->getTimestamp());
}

#[Depends('testSendTextFile')]
#[Depends('testSendBinaryFile')]
public function testNonEmptyFileList()
{
$response = $this->pubnub->listFiles()->channel($this->channel)->sync();
Expand All @@ -57,6 +62,7 @@ public function testNonEmptyFileList()
$this->textFileId = $response->getData()[0]['id'];
}

#[Depends('testNonEmptyFileList')]
public function testGetDownloadUrls()
{
$listFilesResponse = $this->pubnub->listFiles()->channel($this->channel)->sync();
Expand All @@ -71,6 +77,7 @@ public function testGetDownloadUrls()
}
}

#[Depends('testGetDownloadUrls')]
public function testDownloadFiles()
{
$listFilesResponse = $this->pubnub->listFiles()->channel($this->channel)->sync();
Expand All @@ -89,6 +96,7 @@ public function testDownloadFiles()
}
}

#[Depends('testDownloadFiles')]
public function testDeleteAllFiles()
{
$listFilesResponse = $this->pubnub->listFiles()->channel($this->channel)->sync();
Expand Down

0 comments on commit e8b13f2

Please sign in to comment.