Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F5199751
raw.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
vanmeeuwen
Feb 26 2020, 2:25 PM
2020-02-26 14:25:13 (UTC+1)
Size
2 KB
Referenced Files
None
Subscribers
None
raw.txt
View Options
```
public function testFifthWeek(): void
{
$entries = $this->changelogEntries($this->wallet);
$this->assertCount(4, $entries);
$targetDateA = Carbon::now()->subWeeks(5);
$targetDateB = $targetDateA->copy()->addMonths(1);
foreach ($entries as $entry) {
$entry->created_at = $targetDateA;
$entry->updated_at = $targetDateA;
$entry->save();
}
$this->assertEquals(999, $this->wallet->expectedCharges());
foreach ($this->wallet->entitlements as $entitlement) {
$entitlement->chargeWallet();
}
$this->wallet->refresh();
$this->assertEquals(-999, $this->wallet->balance);
$entries = $this->changelogEntries($this->wallet);
foreach ($entries as $entry) {
$this->assertTrue($entry->created_at->eq($targetDateA), "{$entry->created_at} != {$targetDateA}");
$this->assertTrue($entry->updated_at->eq($targetDateB), "{$entry->updated_at} != {$targetDateB}");
}
}
```
```
[vanmeeuwen@mws09 src (dev/billing *+% u+4)]$ > storage/logs/laravel-2020-02-26.log ; php -dzend_extension=xdebug.so vendor/bin/phpunit tests/Feature/BillingTest.php
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
F 1 / 1 (100%)
Time: 1.93 seconds, Memory: 26.00 MB
There was 1 failure:
1) Tests\Feature\BillingTest::testFifthWeek
2020-01-22 13:23:21 != 2020-01-22 13:23:21
Failed asserting that false is true.
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Feature/BillingTest.php:223
FAILURES!
Tests: 1, Assertions: 4, Failures: 1.
Generating code coverage report in HTML format ... done
[vanmeeuwen@mws09 src (dev/billing *+% u+4)]$ > storage/logs/laravel-2020-02-26.log ; php -dzend_extension=xdebug.so vendor/bin/phpunit tests/Feature/BillingTest.php
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
F 1 / 1 (100%)
Time: 1.63 seconds, Memory: 26.00 MB
There was 1 failure:
1) Tests\Feature\BillingTest::testFifthWeek
2020-02-22 13:24:59 != 2020-02-22 13:24:59
Failed asserting that false is true.
/home/vanmeeuwen/devel/src/apheleia/kolab.git/src/tests/Feature/BillingTest.php:224
FAILURES!
Tests: 1, Assertions: 4, Failures: 1.
Generating code coverage report in HTML format ... done
```
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2954392
Default Alt Text
raw.txt (2 KB)
Attached To
Mode
P52 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment