8000 completes hasSomething & removeSomething methods on the Classgenerator by basz · Pull Request #26 · zendframework/zend-code · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

completes hasSomething & removeSomething methods on the Classgenerator #26

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add unittest
  • Loading branch information
basz committed Jan 14, 2016
commit e35bf2ddaddee57c68077fc942aa104418e6a0fa
10 changes: 10 additions & 0 deletions test/Generator/ClassGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,16 @@ public function testAddConstantThrowsExceptionOnDuplicate()
$classGenerator->addConstant('x', 'value1');
}

public function testRemoveConstant()
{
$classGenerator = new ClassGenerator();
$classGenerator->addConstant('constantOne', 'foo');
$this->assertTrue($classGenerator->hasConstant('constantOne'));

$classGenerator->removeConstant('constantOne');
$this->assertFalse($classGenerator->hasConstant('constantOne'));
}

/**
* @group 6274
*/
Expand Down
0