PHP: Optional Function Parameters
Instructions
Loading...
Your exercise will be checked with these tests:
<?php
namespace HexletBasics\DefineFunctions\DefaultArguments;
use PHPUnit\Framework\TestCase;
class SolutionTest extends TestCase
{
public function test()
{
require 'index.php';
$expected1 = '****1234';
$actual1 = getHiddenCard('1234123412341234');
$this->assertEquals($expected1, $actual1);
$expected2 = '**4321';
$actual2 = getHiddenCard('1234123412344321', 2);
$this->assertEquals($expected2, $actual2);
}
}
Teacher's solution will be available in:
20:00
