cURL\Tests\OptionsTest::testRemove PHP 메소드

testRemove() 공개 메소드

public testRemove ( )
    public function testRemove()
    {
        $opts = new Options();
        $opts->set(CURLOPT_TIMEOUT, 123);
        $opts->set(CURLOPT_USERAGENT, 'browser');
        $this->assertTrue($opts->has(CURLOPT_TIMEOUT));
        $opts->remove(CURLOPT_TIMEOUT);
        $this->assertFalse($opts->has(CURLOPT_TIMEOUT));
        $this->assertTrue($opts->has(CURLOPT_USERAGENT));
        $opts->remove(CURLOPT_USERAGENT);
        $this->assertFalse($opts->has(CURLOPT_USERAGENT));
        $this->assertEmpty($opts->toArray());
    }