Skip to content

Commit

Permalink
Changed the code that asserts an item has been claimed from the queue
Browse files Browse the repository at this point in the history
  • Loading branch information
avpaderno committed Feb 16, 2025
1 parent 20ccf3f commit c5ceadb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/apc_storage_queue.test
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
array('@queue' => $name),
);

if ($this->assertTrue($obj instanceof stdClass, $message)) {
if ($this->assertFalse(is_null($obj), $message)) {
$data->claimedItems++;
}
}
Expand All @@ -227,7 +227,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
array('@queue' => $name),
);

$this->assertTrue($obj === NULL, $message);
$this->assertTrue(is_null($obj), $message);
}
}
}
Expand Down Expand Up @@ -265,7 +265,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
array('@queue' => $name),
);

if ($this->assertTrue($obj instanceof stdClass, $message)) {
if ($this->assertFalse(is_null($obj), $message)) {
$data->claimedItems++;
}
}
Expand All @@ -282,7 +282,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
array('@queue' => $name),
);

$this->assertTrue($obj === NULL, $message);
$this->assertTrue(is_null($obj), $message);
}
}

Expand All @@ -309,7 +309,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
);
$obj = $queue->claimItem();

$this->assertTrue($obj instanceof stdClass, $message);
$this->assertFalse(is_null($obj), $message);
}

$message = format_string(
Expand All @@ -324,7 +324,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
array('@queue' => $name),
);

$this->assertTrue($obj === NULL, $message);
$this->assertTrue(is_null($obj), $message);
}
}
}
Expand Down Expand Up @@ -358,7 +358,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
array('@queue' => $name),
);

if ($this->assertTrue($obj instanceof stdClass, $message)) {
if ($this->assertFalse(is_null($obj), $message)) {
$data->claimedItems++;
}
}
Expand All @@ -375,7 +375,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
array('@queue' => $name),
);

$this->assertTrue($obj === NULL, $message);
$this->assertTrue(is_null($obj), $message);
}
}

Expand All @@ -399,7 +399,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
array('@queue' => $name),
);

$this->assertTrue($obj instanceof stdClass, $message);
$this->assertFalse(is_null($obj), $message);
}

$message = format_string(
Expand All @@ -414,7 +414,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
array('@queue' => $name),
);

$this->assertTrue($obj === NULL, $message);
$this->assertTrue(is_null($obj), $message);
}
}
}
Expand Down Expand Up @@ -462,7 +462,7 @@ class ApcStorageQueueTestCase extends ApcStorageBaseTestCase {
}

$message = format_string(
'No item was claimed from the @queue queue.',
'No items were claimed from the @queue queue.',
array('@queue' => $name),
);

Expand Down

0 comments on commit c5ceadb

Please sign in to comment.