404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@52.15.209.178: ~ $
--TEST--
link_005: Pass different class types to constructors
--FILE--
<?php
 
$dir = dirname(__FILE__);
require 'Structures/LinkedList/Double.php';

class TesterExtend extends Structures_LinkedList_DoubleNode {
    protected $_my_number;

    function __construct($tester, $num) {
        $this->_my_number = $num;
        parent::__construct($tester);
    }
}

class TesterFail {
    protected $summary;
    protected $fulltext;

    function __construct($summary, $fulltext) {
        $this->summary = $summary;
        $this->fulltext = $fulltext;
    }
}


// This should work: TesterExtend extends the Structure_LinkedList_DoubleNode class
$tester_extend = new TesterExtend(null, 1);
$xyy = new Structures_LinkedList_Double($tester_extend);
print "Checking for errors in the expected success case:\n";

// This should fail
print "Checking for errors in the expected failure case:\n";
$tester_fail = new TesterFail(null, 1);
$xyy_fail = new Structures_LinkedList_Double($tester_fail);
?>
--EXPECTF--
Checking for errors in the expected success case:
Checking for errors in the expected failure case:

%satal error: Argument 1 passed to Structures_LinkedList_Double::__construct() must be an instance of Structures_LinkedList_DoubleNode%s

Filemanager

Name Type Size Permission Actions
LinkTester.php File 492 B 0644
SingleLinkTester.php File 462 B 0644
link_001.phpt File 987 B 0644
link_002.phpt File 675 B 0644
link_003.phpt File 1000 B 0644
link_004.phpt File 544 B 0644
link_005.phpt File 1.21 KB 0644
link_006.phpt File 991 B 0644
link_007.phpt File 1.32 KB 0644
single_link_001.phpt File 1000 B 0644
single_link_002.phpt File 688 B 0644
single_link_003.phpt File 1013 B 0644
single_link_004.phpt File 557 B 0644
single_link_005.phpt File 1.22 KB 0644
single_link_006.phpt File 1004 B 0644
single_link_007.phpt File 1.19 KB 0644