/**
  * @test
  */
 public function namedBindingIsNotUsedWhenNoGenericBindingSpecified()
 {
     $binder = new Binder();
     $binder->bind(Employee::class)->named('schst')->to(Boss::class);
     $injector = $binder->getInjector();
     assertFalse($injector->hasBinding(Employee::class));
 }
 /**
  * @test
  */
 public function isSupressableReturnsFalseAsSoonAsOneHandlerDeniesSupressability()
 {
     $this->errorHandler1->mapCalls(['isSupressable' => true]);
     $this->errorHandler2->mapCalls(['isSupressable' => false]);
     assertFalse($this->errorHandlers->isSupressable(1, 'foo'));
     verify($this->errorHandler3, 'isSupressable')->wasNeverCalled();
 }
 /**
  * @param  array  $contained
  * @param  mixed   $value
  * @test
  * @dataProvider  tuplesEvaluatingToFalse
  */
 public function evaluatesToFalse(array $contained, $value)
 {
     assertFalse(value($value)->containsAnyOf($contained));
 }
 /**
  * @test
  */
 public function eofReturnsEofFromDecoratedStream()
 {
     assertFalse($this->decodingInputStream->eof());
 }
 /**
  * @test
  * @since  8.1.0
  */
 public function evaluatesToFalseForSimilarValueWhenStrictEnabled()
 {
     assertFalse(value(1)->isOneOf([true, '1', 'true'], true));
 }
Example #6
0
 /**
  * @test
  */
 public function nullingTheStreamClosesTheResource()
 {
     $this->stream = null;
     assertFalse(is_resource($this->underlyingStream));
 }
 /**
  * @test
  */
 public function developmentHasNoErrorHandlerByDefault()
 {
     assertFalse((new Development())->registerErrorHandler('/tmp'));
 }
Example #8
0
 /**
  * @param  mixed  $value
  * @test
  * @dataProvider  nonEmptyValues
  * @since  6.2.0
  */
 public function isNotEmptyForNomEmptyValues($value)
 {
     assertFalse(Result::of($value)->isEmpty());
 }
 /**
  * @param  string  $value
  * @test
  * @dataProvider  invalidValues
  */
 public function invalidValueEvaluatesToFalse($value)
 {
     assertFalse(isMailAddress($value));
 }
Example #10
0
 /**
  * @test
  * @since  8.0.0
  */
 public function invalidRfcsAreInvalid()
 {
     assertFalse(Http::isValidRfc('RFC 0815'));
 }
 /**
  * @test
  * @dataProvider  acceptedMimetypes
  */
 public function doesNotHaveSharedAcceptablesForNonEqualLists(array $accepted)
 {
     assertFalse($this->acceptHeader->addAcceptable('text/html')->hasSharedAcceptables($accepted));
 }
 /**
  * @test
  */
 public function doesNotHaveExplicitBindingWhenNotDefined()
 {
     $injector = Binder::createInjector();
     assertFalse($injector->hasExplicitBinding(Goodyear::class));
 }
Example #13
0
 /**
  * @test
  * @since  5.0.0
  */
 public function runtimeIsNotInitializedWhenNoInstanceCreated()
 {
     assertFalse(Runtime::initialized());
 }
 /**
  * @test
  * @dataProvider  throwables
  */
 public function loggingDisabledDoesNotCreateLogfile($throwable)
 {
     $this->exceptionHandler->disableLogging()->handleException($throwable);
     assertFalse($this->root->hasChild('log/errors/' . date('Y') . '/' . date('m') . '/exceptions-' . date('Y-m-d') . '.log'));
 }
 /**
  * @param  mixed                      $needle
  * @param  string|array|\Traversable  $haystack
  * @test
  * @dataProvider  tuplesEvaluatingToFalse
  */
 public function evaluatesToFalse($needle, $haystack)
 {
     assertFalse(value($haystack)->contains($needle));
 }
 /**
  * @test
  */
 public function checkForNonExistingParamReturnsFalse()
 {
     assertFalse($this->emptyQueryString->containsParam('doesNotExist'));
 }
 /**
  * @test
  * @dataProvider  createProvides
  */
 public function evaluatesToFalseIfTestedSequenceContainsMoreValues(Provides $provides)
 {
     assertFalse($provides->test(Sequence::of(['foo' => 1, 'bar' => 2])));
 }
Example #18
0
 /**
  * @test
  */
 public function returnsFalseOnCheckForNonExistingHeader()
 {
     assertFalse($this->headerList->containsKey('foo'));
 }
 /**
  * @test
  */
 public function doesNotHaveValueWhenPropertyNotSet()
 {
     assertFalse($this->createPropertyBinding()->hasProperty('does.not.exist'));
 }
 /**
  * @param  scalar  $expected
  * @param  mixed   $value
  * @test
  * @dataProvider  tuplesEvaluatingToFalse
  */
 public function evaluatesToFalse($expected, $value)
 {
     assertFalse(value($value)->equals($expected));
 }
 /**
  * @test
  */
 public function doesNotEqualWhenMinorVersionDiffers()
 {
     assertFalse(HttpVersion::fromString(HttpVersion::HTTP_1_1)->equals(HttpVersion::HTTP_1_0));
 }
 /**
  * @test
  */
 public function eofCallsDecoratedStream()
 {
     assertFalse($this->decoratedInputStream->eof());
 }
 /**
  * @test
  */
 public function checkForNonExistingConstantReturnsFalse()
 {
     assertFalse(Binder::createInjector()->hasConstant('answer'));
 }
 /**
  * @test
  */
 public function injectorReturnsFalseForNonAddedMapOnCheck()
 {
     assertFalse(Binder::createInjector()->hasBinding(MapBinding::TYPE, 'mapConfig'));
 }
Example #25
0
 /**
  * @param  string  $pattern
  * @param  string  $value
  * @test
  * @dataProvider  invalidValues
  */
 public function invalidValueEvaluatesToFalse($pattern, $value)
 {
     assertFalse(pattern($pattern)->matches($value));
 }
 /**
  * @test
  */
 public function isNeverSupressable()
 {
     assertFalse($this->logErrorHandler->isSupressable(E_NOTICE, 'foo'));
 }