Skip to content

Commit

Permalink
Merge pull request #2 from avengers/develop
Browse files Browse the repository at this point in the history
Changed adamwathan/form dependency to avengers/form
  • Loading branch information
emir authored Sep 25, 2017
2 parents e9b1638 + 1dc0230 commit 01c4645
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"license": "MIT",
"require": {
"php": ">=5.4.0",
"adamwathan/form": "^0.9.0"
"avengers/form": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
Expand Down
2 changes: 1 addition & 1 deletion src/TheAvengers/BootForms/BasicFormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use TheAvengers\BootForms\Elements\GroupWrapper;
use TheAvengers\BootForms\Elements\HelpBlock;
use TheAvengers\BootForms\Elements\InputGroup;
use AdamWathan\Form\FormBuilder;
use TheAvengers\Form\FormBuilder;

class BasicFormBuilder
{
Expand Down
6 changes: 3 additions & 3 deletions src/TheAvengers/BootForms/BootFormsServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php namespace TheAvengers\BootForms;

use AdamWathan\Form\ErrorStore\IlluminateErrorStore;
use AdamWathan\Form\FormBuilder;
use AdamWathan\Form\OldInput\IlluminateOldInputProvider;
use TheAvengers\Form\ErrorStore\IlluminateErrorStore;
use TheAvengers\Form\FormBuilder;
use TheAvengers\Form\OldInput\IlluminateOldInputProvider;
use Illuminate\Support\ServiceProvider;

class BootFormsServiceProvider extends ServiceProvider
Expand Down
2 changes: 1 addition & 1 deletion src/TheAvengers/BootForms/Elements/CheckGroup.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Label;
use TheAvengers\Form\Elements\Label;

class CheckGroup extends FormGroup
{
Expand Down
4 changes: 2 additions & 2 deletions src/TheAvengers/BootForms/Elements/FormGroup.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Element;
use AdamWathan\Form\Elements\Label;
use TheAvengers\Form\Elements\Element;
use TheAvengers\Form\Elements\Label;

class FormGroup extends Element
{
Expand Down
2 changes: 1 addition & 1 deletion src/TheAvengers/BootForms/Elements/GroupWrapper.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Label;
use TheAvengers\Form\Elements\Label;

class GroupWrapper
{
Expand Down
2 changes: 1 addition & 1 deletion src/TheAvengers/BootForms/Elements/HelpBlock.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Element;
use TheAvengers\Form\Elements\Element;

class HelpBlock extends Element
{
Expand Down
4 changes: 2 additions & 2 deletions src/TheAvengers/BootForms/Elements/HorizontalFormGroup.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Element;
use AdamWathan\Form\Elements\Label;
use TheAvengers\Form\Elements\Element;
use TheAvengers\Form\Elements\Label;

class HorizontalFormGroup extends FormGroup
{
Expand Down
2 changes: 1 addition & 1 deletion src/TheAvengers/BootForms/Elements/InputGroup.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace TheAvengers\BootForms\Elements;

use AdamWathan\Form\Elements\Text;
use TheAvengers\Form\Elements\Text;

class InputGroup extends Text
{
Expand Down
2 changes: 1 addition & 1 deletion src/TheAvengers/BootForms/HorizontalFormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use TheAvengers\BootForms\Elements\HelpBlock;
use TheAvengers\BootForms\Elements\HorizontalFormGroup;
use TheAvengers\BootForms\Elements\OffsetFormGroup;
use AdamWathan\Form\FormBuilder;
use TheAvengers\Form\FormBuilder;

class HorizontalFormBuilder extends BasicFormBuilder
{
Expand Down
44 changes: 22 additions & 22 deletions tests/BasicFormBuilderTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use TheAvengers\BootForms\BasicFormBuilder;
use AdamWathan\Form\FormBuilder;
use TheAvengers\Form\FormBuilder;

class BasicFormBuilderTest extends PHPUnit_Framework_TestCase
{
Expand Down Expand Up @@ -35,7 +35,7 @@ public function testRenderTextGroupWithValue()

public function testRenderTextGroupWithError()
{
$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Email is required.');

Expand All @@ -48,7 +48,7 @@ public function testRenderTextGroupWithError()

public function testRenderTextGroupWithErrorOverridesCustomHelpBlock()
{
$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Email is required.');

Expand All @@ -61,7 +61,7 @@ public function testRenderTextGroupWithErrorOverridesCustomHelpBlock()

public function testRenderTextGroupWithOldInput()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('[email protected]');

Expand All @@ -74,7 +74,7 @@ public function testRenderTextGroupWithOldInput()

public function testRenderTextGroupWithOldInputAndDefaultValue()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('[email protected]');

Expand All @@ -94,13 +94,13 @@ public function testRenderTextGroupWithDefaultValue()

public function testRenderTextGroupWithOldInputAndError()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('[email protected]');

$this->builder->setOldInputProvider($oldInput);

$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Email is required.');

Expand All @@ -120,7 +120,7 @@ public function testRenderPasswordGroup()

public function testRenderPasswordGroupDoesntKeepOldInput()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('password');

Expand All @@ -133,7 +133,7 @@ public function testRenderPasswordGroupDoesntKeepOldInput()

public function testRenderPasswordGroupWithError()
{
$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Password is required.');

Expand Down Expand Up @@ -198,7 +198,7 @@ public function testRenderSelectWithSelected()

public function testRenderSelectWithError()
{
$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Color is required.');

Expand All @@ -213,7 +213,7 @@ public function testRenderSelectWithError()

public function testRenderSelectWithOldInput()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('2');

Expand All @@ -235,7 +235,7 @@ public function testRenderCheckbox()

public function testRenderCheckboxWithError()
{
$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Must agree to terms.');

Expand All @@ -248,7 +248,7 @@ public function testRenderCheckboxWithError()

public function testRenderCheckboxWithOldInput()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('1');

Expand All @@ -275,7 +275,7 @@ public function testRenderRadio()

public function testRenderRadioWithError()
{
$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Sample error');

Expand All @@ -287,7 +287,7 @@ public function testRenderRadioWithError()

public function testRenderRadioWithOldInput()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('red');

Expand Down Expand Up @@ -321,7 +321,7 @@ public function testRenderTextareaWithCols()

public function testRenderTextareaWithOldInput()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('Sample bio');

Expand All @@ -333,7 +333,7 @@ public function testRenderTextareaWithOldInput()

public function testRenderTextareaWithError()
{
$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Sample error');

Expand Down Expand Up @@ -486,7 +486,7 @@ public function testRenderFileGroup()

public function testRenderFileGroupWithError()
{
$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Sample error');

Expand Down Expand Up @@ -595,7 +595,7 @@ public function testRenderInputGroupWithValue()

public function testRenderInputGroupWithOldInput()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('xyz');

Expand All @@ -608,7 +608,7 @@ public function testRenderInputGroupWithOldInput()

public function testRenderInputGroupWithOldInputAndDefaultValue()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('xyz');

Expand All @@ -628,13 +628,13 @@ public function testRenderInputGroupWithDefaultValue()

public function testRenderInputGroupWithOldInputAndError()
{
$oldInput = Mockery::mock('AdamWathan\Form\OldInput\OldInputInterface');
$oldInput = Mockery::mock('TheAvengers\Form\OldInput\OldInputInterface');
$oldInput->shouldReceive('hasOldInput')->andReturn(true);
$oldInput->shouldReceive('getOldInput')->andReturn('abc');

$this->builder->setOldInputProvider($oldInput);

$errorStore = Mockery::mock('AdamWathan\Form\ErrorStore\ErrorStoreInterface');
$errorStore = Mockery::mock('TheAvengers\Form\ErrorStore\ErrorStoreInterface');
$errorStore->shouldReceive('hasError')->andReturn(true);
$errorStore->shouldReceive('getError')->andReturn('Test is required.');

Expand Down
2 changes: 1 addition & 1 deletion tests/FormGroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use TheAvengers\BootForms\Elements\FormGroup;
use TheAvengers\BootForms\Elements\HelpBlock;
use AdamWathan\Form\FormBuilder;
use TheAvengers\Form\FormBuilder;

class FormGroupTest extends PHPUnit_Framework_TestCase
{
Expand Down
Loading

0 comments on commit 01c4645

Please sign in to comment.