Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2485075
MandateTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
MandateTest.php
View Options
<?php
namespace
Tests\Feature\Console\Wallet
;
use
Illuminate\Support\Facades\Queue
;
use
Tests\TestCase
;
class
MandateTest
extends
TestCase
{
/**
* {@inheritDoc}
*/
public
function
setUp
():
void
{
parent
::
setUp
();
$this
->
deleteTestUser
(
'wallets-controller@kolabnow.com'
);
}
/**
* {@inheritDoc}
*/
public
function
tearDown
():
void
{
$this
->
deleteTestUser
(
'wallets-controller@kolabnow.com'
);
parent
::
tearDown
();
}
/**
* Test command run for a specified wallet
*/
public
function
testHandle
():
void
{
Queue
::
fake
();
$user
=
$this
->
getTestUser
(
'wallets-controller@kolabnow.com'
);
$wallet
=
$user
->
wallets
()->
first
();
// Non-existing wallet
$code
=
\Artisan
::
call
(
"wallet:mandate 123"
);
$output
=
trim
(
\Artisan
::
output
());
$this
->
assertSame
(
1
,
$code
);
$this
->
assertSame
(
"Wallet not found."
,
$output
);
// No mandate
$code
=
\Artisan
::
call
(
"wallet:mandate {$wallet->id}"
);
$output
=
trim
(
\Artisan
::
output
());
$this
->
assertSame
(
0
,
$code
);
$this
->
assertSame
(
"Auto-payment: none"
,
$output
);
// TODO: Test an existing mandate
$this
->
markTestIncomplete
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Nov 20, 9:10 PM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
387092
Default Alt Text
MandateTest.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment