How to use excludeMethod method of coverage class

Best Atoum code snippet using coverage.excludeMethod

coverage.php

Source:coverage.php Github

copy

Full Screen

...290 ->if($coverage = new testedClass())291 ->then292 ->object($coverage->resetExcludedMethods())->isIdenticalTo($coverage)293 ->array($coverage->getExcludedMethods())->isEmpty()294 ->if($coverage->excludeMethod(uniqid()))295 ->then296 ->object($coverage->resetExcludedMethods())->isIdenticalTo($coverage)297 ->array($coverage->getExcludedMethods())->isEmpty()298 ;299 }300 public function testResetExcludedClasses()301 {302 $this303 ->if($coverage = new testedClass())304 ->then305 ->object($coverage->resetExcludedClasses())->isIdenticalTo($coverage)306 ->array($coverage->getExcludedClasses())->isEmpty()307 ->if($coverage->excludeClass(uniqid()))308 ->then309 ->object($coverage->resetExcludedClasses())->isIdenticalTo($coverage)310 ->array($coverage->getExcludedClasses())->isEmpty()311 ;312 }313 public function testResetExcludedNamespaces()314 {315 $this316 ->if($coverage = new testedClass())317 ->then318 ->object($coverage->resetExcludedNamespaces())->isIdenticalTo($coverage)319 ->array($coverage->getExcludedNamespaces())->isEmpty()320 ->if($coverage->excludeNamespace(uniqid()))321 ->then322 ->object($coverage->resetExcludedNamespaces())->isIdenticalTo($coverage)323 ->array($coverage->getExcludedNamespaces())->isEmpty()324 ;325 }326 public function testResetExcludedDirectories()327 {328 $this329 ->if($coverage = new testedClass())330 ->then331 ->object($coverage->resetExcludedDirectories())->isIdenticalTo($coverage)332 ->array($coverage->getExcludedDirectories())->isEmpty()333 ->if($coverage->excludeDirectory(uniqid()))334 ->then335 ->object($coverage->resetExcludedDirectories())->isIdenticalTo($coverage)336 ->array($coverage->getExcludedDirectories())->isEmpty()337 ;338 }339 public function testMerge()340 {341 $this342 ->if($classController = new mock\controller())343 ->and($classController->disableMethodChecking())344 ->and($classController->__construct = function () {345 })346 ->and($classController->getName = function () use (& $className) {347 return $className;348 })349 ->and($classController->getFileName = function () use (& $classFile) {350 return $classFile;351 })352 ->and($classController->getTraits = [])353 ->and($classController->getStartLine = 1)354 ->and($classController->getEndLine = 12)355 ->and($class = new \mock\reflectionClass(uniqid(), $classController))356 ->and($methodController = new mock\controller())357 ->and($methodController->__construct = function () {358 })359 ->and($methodController->getName = function () use (& $methodName) {360 return $methodName;361 })362 ->and($methodController->isAbstract = false)363 ->and($methodController->getFileName = function () use (& $classFile) {364 return $classFile;365 })366 ->and($methodController->getDeclaringClass = function () use ($class) {367 return $class;368 })369 ->and($methodController->getStartLine = 6)370 ->and($methodController->getEndLine = 8)371 ->and($method = new \mock\reflectionMethod(uniqid(), uniqid(), $methodController))372 ->and($classController->getMethod = function () use ($method) {373 return $method;374 })375 ->and($classController->getMethods = [$method])376 ->and($classFile = uniqid())377 ->and($className = uniqid())378 ->and($methodName = uniqid())379 ->and(380 $xdebugData = [381 $classFile =>382 [383 5 => -2,384 6 => -1,385 7 => 1,386 8 => -2,387 9 =>-2388 ],389 uniqid() =>390 [391 5 => 2,392 6 => 3,393 7 => 4,394 8 => 3,395 9 => 2396 ]397 ]398 )399 ->and($coverage = new testedClass())400 ->and($coverage->setReflectionClassFactory(function () use ($class) {401 return $class;402 }))403 ->then404 ->object($coverage->merge($coverage))->isIdenticalTo($coverage)405 ->array($coverage->getClasses())->isEmpty()406 ->array($coverage->getMethods())->isEmpty()407 ->if($otherCoverage = new testedClass())408 ->then409 ->object($coverage->merge($otherCoverage))->isIdenticalTo($coverage)410 ->array($coverage->getClasses())->isEmpty()411 ->array($coverage->getMethods())->isEmpty()412 ->if($coverage->addXdebugDataForTest($this, $xdebugData))413 ->then414 ->object($coverage->merge($otherCoverage))->isIdenticalTo($coverage)415 ->array($coverage->getClasses())->isEqualTo([$className => $classFile])416 ->array($coverage->getMethods())->isEqualTo(417 [418 $className => [419 $methodName => [420 6 => -1,421 7 => 1,422 8 => -2423 ]424 ]425 ]426 )427 ->object($coverage->merge($coverage))->isIdenticalTo($coverage)428 ->array($coverage->getClasses())->isEqualTo([$className => $classFile])429 ->array($coverage->getMethods())->isEqualTo(430 [431 $className => [432 $methodName => [433 6 => -1,434 7 => 1,435 8 => -2436 ]437 ]438 ]439 )440 ->if($otherClassController = new mock\controller())441 ->and($otherClassController->disableMethodChecking())442 ->and($otherClassController->__construct = function () {443 })444 ->and($otherClassController->getName = function () use (& $otherClassName) {445 return $otherClassName;446 })447 ->and($otherClassController->getFileName = function () use (& $otherClassFile) {448 return $otherClassFile;449 })450 ->and($otherClassController->getTraits = [])451 ->and($otherClassController->getStartLine = 1)452 ->and($otherClassController->getEndLine = 12)453 ->and($otherClass = new \mock\reflectionClass($class, $otherClassController))454 ->and($otherMethodController = new mock\controller())455 ->and($otherMethodController->__construct = function () {456 })457 ->and($otherMethodController->getName = function () use (& $otherMethodName) {458 return $otherMethodName;459 })460 ->and($otherMethodController->isAbstract = false)461 ->and($otherMethodController->getFileName = function () use (& $otherClassFile) {462 return $otherClassFile;463 })464 ->and($otherMethodController->getDeclaringClass = function () use ($otherClass) {465 return $otherClass;466 })467 ->and($otherMethodController->getStartLine = 5)468 ->and($otherMethodController->getEndLine = 9)469 ->and($otherClassController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $otherMethodController)])470 ->and($otherClassFile = uniqid())471 ->and($otherClassName = uniqid())472 ->and($otherMethodName = uniqid())473 ->and(474 $otherXdebugData = [475 $otherClassFile => [476 1 => -2,477 2 => -1,478 3 => 1,479 4 => 1,480 5 => -1,481 6 => 1,482 7 => 1,483 8 => -1,484 9 => -2,485 10 => 1486 ],487 uniqid() => [488 500 => 200,489 600 => 300,490 700 => 400,491 800 => 300,492 900 => 200493 ]494 ]495 )496 ->and($otherCoverage->setReflectionClassFactory(function () use ($otherClass) {497 return $otherClass;498 }))499 ->then500 ->object($coverage->merge($otherCoverage->addXdebugDataForTest($this, $otherXdebugData)))->isIdenticalTo($coverage)501 ->array($coverage->getClasses())->isEqualTo(502 [503 $className => $classFile,504 $otherClassName => $otherClassFile505 ]506 )507 ->array($coverage->getMethods())->isEqualTo(508 [509 $className => [510 $methodName => [511 6 => -1,512 7 => 1,513 8 =>-2514 ]515 ],516 $otherClassName => [517 $otherMethodName => [518 5 => -1,519 6 => 1,520 7 => 1,521 8 => -1,522 9 => -2523 ]524 ]525 ]526 )527 ->if($classController = new mock\controller())528 ->and($classController->disableMethodChecking())529 ->and($classController->__construct = function () {530 })531 ->and($classController->getName = function () use (& $className) {532 return $className;533 })534 ->and($classController->getFileName = function () use (& $classFile) {535 return $classFile;536 })537 ->and($classController->getTraits = [])538 ->and($classController->getStartLine = 1)539 ->and($classController->getEndLine = 12)540 ->and($class = new \mock\reflectionClass(uniqid(), $classController))541 ->and($methodController = new mock\controller())542 ->and($methodController->__construct = function () {543 })544 ->and($methodController->getName = function () use (& $methodName) {545 return $methodName;546 })547 ->and($methodController->isAbstract = false)548 ->and($methodController->getFileName = function () use (& $classFile) {549 return $classFile;550 })551 ->and($methodController->getDeclaringClass = function () use ($class) {552 return $class;553 })554 ->and($methodController->getStartLine = 6)555 ->and($methodController->getEndLine = 8)556 ->and($method = new \mock\reflectionMethod(uniqid(), uniqid(), $methodController))557 ->and($classController->getMethod = function () use ($method) {558 return $method;559 })560 ->and($classController->getMethods = [$method])561 ->and($classFile = uniqid())562 ->and($className = uniqid())563 ->and($methodName = uniqid())564 ->and(565 $xdebugData = [566 $classFile => [567 5 => -2,568 6 => -1,569 7 => 1,570 8 => -2,571 9 =>-2572 ],573 uniqid() => [574 5 => 2,575 6 => 3,576 7 => 4,577 8 => 3,578 9 => 2579 ]580 ]581 )582 ->and($coverage = new testedClass())583 ->and($coverage->setReflectionClassFactory(function () use ($class) {584 return $class;585 }))586 ->and($coverage->excludeClass($className))587 ->and($otherCoverage = new testedClass())588 ->and($otherCoverage->setReflectionClassFactory(function () use ($class) {589 return $class;590 }))591 ->and($otherCoverage->addXdebugDataForTest($this, $xdebugData))592 ->then593 ->array($otherCoverage->getClasses())->isNotEmpty()594 ->array($otherCoverage->getMethods())->isNotEmpty()595 ->object($coverage->merge($otherCoverage))->isIdenticalTo($coverage)596 ->array($coverage->getClasses())->isEmpty()597 ->array($coverage->getMethods())->isEmpty()598 ;599 }600 public function testCount()601 {602 $this603 ->if($coverage = new testedClass())604 ->then605 ->sizeOf($coverage)->isZero()606 ->if($classController = new mock\controller())607 ->and($classController->disableMethodChecking())608 ->and($classController->__construct = function () {609 })610 ->and($classController->getName = function () use (& $className) {611 return $className;612 })613 ->and($classController->getFileName = function () use (& $classFile) {614 return $classFile;615 })616 ->and($classController->getTraits = [])617 ->and($classController->getStartLine = 1)618 ->and($classController->getEndLine = 12)619 ->and($class = new \mock\reflectionClass(uniqid(), $classController))620 ->and($methodController = new mock\controller())621 ->and($methodController->__construct = function () {622 })623 ->and($methodController->getName = function () use (& $methodName) {624 return $methodName;625 })626 ->and($methodController->isAbstract = false)627 ->and($methodController->getFileName = function () use (& $classFile) {628 return $classFile;629 })630 ->and($methodController->getDeclaringClass = function () use ($class) {631 return $class;632 })633 ->and($methodController->getStartLine = 6)634 ->and($methodController->getEndLine = 8)635 ->and($classController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $methodController)])636 ->and($classFile = uniqid())637 ->and($className = uniqid())638 ->and($methodName = uniqid())639 ->and(640 $xdebugData = [641 $classFile => [642 5 => 1,643 6 => 2,644 7 => 3,645 8 => 2,646 9 => 1647 ],648 uniqid() => [649 5 => 2,650 6 => 3,651 7 => 4,652 8 => 3,653 9 => 2654 ]655 ]656 )657 ->and($coverage->setReflectionClassFactory(function () use ($class) {658 return $class;659 }))660 ->then661 ->sizeOf($coverage->addXdebugDataForTest($this, $xdebugData))->isEqualTo(1)662 ;663 }664 public function testGetClasses()665 {666 $this667 ->if($classController = new mock\controller())668 ->and($classController->disableMethodChecking())669 ->and($classController->__construct = function () {670 })671 ->and($classController->getName = function () use (& $className) {672 return $className;673 })674 ->and($classController->getFileName = function () use (& $classFile) {675 return $classFile;676 })677 ->and($classController->getTraits = [])678 ->and($classController->getStartLine = 1)679 ->and($classController->getEndLine = 12)680 ->and($class = new \mock\reflectionClass(uniqid(), $classController))681 ->and($methodController = new mock\controller())682 ->and($methodController->__construct = function () {683 })684 ->and($methodController->getName = function () {685 return uniqid();686 })687 ->and($methodController->isAbstract = false)688 ->and($methodController->getFileName = function () use (& $classFile) {689 return $classFile;690 })691 ->and($methodController->getDeclaringClass = function () use ($class) {692 return $class;693 })694 ->and($methodController->getStartLine = 4)695 ->and($methodController->getEndLine = 8)696 ->and($classController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $methodController)])697 ->and($classFile = uniqid())698 ->and($className = uniqid())699 ->and(700 $xdebugData = [701 $classFile => [702 3 => -2,703 4 => -1,704 5 => -1,705 6 => -1,706 7 => -1,707 8 => -2,708 9 => -2709 ]710 ]711 )712 ->and($coverage = new testedClass())713 ->and($coverage->setReflectionClassFactory(function () use ($class) {714 return $class;715 }))716 ->and($coverage->addXdebugDataForTest($this, $xdebugData))717 ->then718 ->array($coverage->getClasses())->isEqualTo([$className => $classFile])719 ;720 }721 public function testGetValue()722 {723 $this724 ->if($classController = new mock\controller())725 ->and($classController->disableMethodChecking())726 ->and($classController->__construct = function () {727 })728 ->and($classController->getName = function () use (& $className) {729 return $className;730 })731 ->and($classController->getFileName = function () use (& $classFile) {732 return $classFile;733 })734 ->and($classController->getTraits = [])735 ->and($classController->getStartLine = 1)736 ->and($classController->getEndLine = 12)737 ->and($class = new \mock\reflectionClass(uniqid(), $classController))738 ->and($methodController = new mock\controller())739 ->and($methodController->__construct = function () {740 })741 ->and($methodController->getName = function () {742 return uniqid();743 })744 ->and($methodController->isAbstract = false)745 ->and($methodController->getFileName = function () use (& $classFile) {746 return $classFile;747 })748 ->and($methodController->getDeclaringClass = function () use ($class) {749 return $class;750 })751 ->and($methodController->getStartLine = 4)752 ->and($methodController->getEndLine = 8)753 ->and($classController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $methodController)])754 ->and($classFile = uniqid())755 ->and($className = uniqid())756 ->and(757 $xdebugData = [758 $classFile => [759 3 => -2,760 4 => -1,761 5 => -1,762 6 => -1,763 7 => -1,764 8 => -2,765 9 => -2766 ],767 uniqid() => [768 5 => 2,769 6 => 3,770 7 => 4,771 8 => 3,772 9 => 2773 ]774 ]775 )776 ->and($coverage = new testedClass())777 ->and($coverage->setReflectionClassFactory(function () use ($class) {778 return $class;779 }))780 ->and($coverage->addXdebugDataForTest($this, $xdebugData))781 ->then782 ->float($coverage->getValue())->isEqualTo(0.0)783 ->if(784 $xdebugData = [785 $classFile => [786 3 => -2,787 4 => 1,788 5 => -1,789 6 => -1,790 7 => -1,791 8 => -2,792 9 => -1793 ],794 uniqid() => [795 5 => 2,796 6 => 3,797 7 => 4,798 8 => 3,799 9 => 2800 ]801 ]802 )803 ->and($coverage->reset()->addXdebugDataForTest($this, $xdebugData))804 ->then805 ->float($coverage->getValue())->isEqualTo(1 / 4)806 ->if(807 $xdebugData = [808 $classFile => [809 3 => -2,810 4 => 1,811 5 => -1,812 6 => -1,813 7 => 1,814 8 => -2,815 9 => -1816 ],817 uniqid() => [818 5 => 2,819 6 => 3,820 7 => 4,821 8 => 3,822 9 => 2823 ]824 ]825 )826 ->and($coverage->reset()->addXdebugDataForTest($this, $xdebugData))827 ->then828 ->float($coverage->getValue())->isEqualTo(2 / 4)829 ->if(830 $xdebugData = [831 $classFile => [832 3 => -2,833 4 => 1,834 5 => 1,835 6 => 1,836 7 => 1,837 8 => -2,838 9 => -1839 ],840 uniqid() => [841 5 => 2,842 6 => 3,843 7 => 4,844 8 => 3,845 9 => 2846 ]847 ]848 )849 ->and($coverage->reset()->addXdebugDataForTest($this, $xdebugData))850 ->then851 ->float($coverage->getValue())->isEqualTo(1.0)852 ;853 }854 public function testGetValueForClass()855 {856 $this857 ->if($coverage = new testedClass())858 ->then859 ->variable($coverage->getValueForClass(uniqid()))->isNull()860 ->if($classController = new mock\controller())861 ->and($classController->disableMethodChecking())862 ->and($classController->__construct = function () {863 })864 ->and($classController->getName = function () use (& $className) {865 return $className;866 })867 ->and($classController->getFileName = function () use (& $classFile) {868 return $classFile;869 })870 ->and($classController->getTraits = [])871 ->and($classController->getStartLine = 1)872 ->and($classController->getEndLine = 12)873 ->and($class = new \mock\reflectionClass(uniqid(), $classController))874 ->and($methodController = new mock\controller())875 ->and($methodController->__construct = function () {876 })877 ->and($methodController->getName = function () {878 return uniqid();879 })880 ->and($methodController->isAbstract = false)881 ->and($methodController->getFileName = function () use (& $classFile) {882 return $classFile;883 })884 ->and($methodController->getDeclaringClass = function () use ($class) {885 return $class;886 })887 ->and($methodController->getStartLine = 4)888 ->and($methodController->getEndLine = 8)889 ->and($classController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $methodController)])890 ->and($classFile = uniqid())891 ->and($className = uniqid())892 ->and(893 $xdebugData = [894 $classFile => [895 3 => -2,896 4 => -1,897 5 => -1,898 6 => -1,899 7 => -1,900 8 => -2,901 9 => -2902 ],903 uniqid() => [904 5 => 2,905 6 => 3,906 7 => 4,907 8 => 3,908 9 => 2909 ]910 ]911 )912 ->and($coverage = new testedClass())913 ->and($coverage->setReflectionClassFactory(function () use ($class) {914 return $class;915 }))916 ->and($coverage->addXdebugDataForTest($this, $xdebugData))917 ->then918 ->variable($coverage->getValueForClass(uniqid()))->isNull()919 ->float($coverage->getValueForClass($className))->isEqualTo(0.0)920 ->if(921 $xdebugData = [922 $classFile => [923 3 => -2,924 4 => 1,925 5 => -1,926 6 => -1,927 7 => -1,928 8 => -2,929 9 => -1930 ],931 uniqid() => [932 5 => 2,933 6 => 3,934 7 => 4,935 8 => 3,936 9 => 2937 ]938 ]939 )940 ->and($coverage->reset()->addXdebugDataForTest($this, $xdebugData))941 ->then942 ->variable($coverage->getValueForClass(uniqid()))->isNull()943 ->float($coverage->getValueForClass($className))->isEqualTo(1 / 4)944 ->if(945 $xdebugData = [946 $classFile => [947 3 => -2,948 4 => 1,949 5 => -1,950 6 => -1,951 7 => 1,952 8 => -2,953 9 => -1954 ],955 uniqid() => [956 5 => 2,957 6 => 3,958 7 => 4,959 8 => 3,960 9 => 2961 ]962 ]963 )964 ->and($coverage->reset()->addXdebugDataForTest($this, $xdebugData))965 ->then966 ->variable($coverage->getValueForClass(uniqid()))->isNull()967 ->float($coverage->getValueForClass($className))->isEqualTo(2 / 4)968 ->if(969 $xdebugData = [970 $classFile => [971 3 => -2,972 4 => 1,973 5 => 1,974 6 => 1,975 7 => 1,976 8 => -2,977 9 => -1978 ],979 uniqid() => [980 5 => 2,981 6 => 3,982 7 => 4,983 8 => 3,984 9 => 2985 ]986 ]987 )988 ->and($coverage->reset()->addXdebugDataForTest($this, $xdebugData))989 ->then990 ->variable($coverage->getValueForClass(uniqid()))->isNull()991 ->float($coverage->getValueForClass($className))->isEqualTo(1.0)992 ;993 }994 public function testGetCoverageForClass()995 {996 $this997 ->if($coverage = new testedClass())998 ->then999 ->array($coverage->getCoverageForClass(uniqid()))->isEmpty()1000 ->if($classController = new mock\controller())1001 ->and($classController->disableMethodChecking())1002 ->and($classController->__construct = function () {1003 })1004 ->and($classController->getName = function () use (& $className) {1005 return $className;1006 })1007 ->and($classController->getFileName = function () use (& $classFile) {1008 return $classFile;1009 })1010 ->and($classController->getTraits = [])1011 ->and($classController->getStartLine = 1)1012 ->and($classController->getEndLine = 12)1013 ->and($class = new \mock\reflectionClass(uniqid(), $classController))1014 ->and($methodController = new mock\controller())1015 ->and($methodController->__construct = function () {1016 })1017 ->and($methodController->getName = function () use (& $methodName) {1018 return $methodName;1019 })1020 ->and($methodController->isAbstract = false)1021 ->and($methodController->getFileName = function () use (& $classFile) {1022 return $classFile;1023 })1024 ->and($methodController->getDeclaringClass = function () use ($class) {1025 return $class;1026 })1027 ->and($methodController->getStartLine = 4)1028 ->and($methodController->getEndLine = 8)1029 ->and($classController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $methodController)])1030 ->and($classFile = uniqid())1031 ->and($className = uniqid())1032 ->and($methodName = uniqid())1033 ->and(1034 $xdebugData = [1035 $classFile => [1036 3 => -2,1037 4 => 1,1038 5 => -1,1039 6 => -1,1040 7 => -1,1041 8 => -2,1042 9 => -11043 ],1044 uniqid() => [1045 5 => 2,1046 6 => 3,1047 7 => 4,1048 8 => 3,1049 9 => 21050 ]1051 ]1052 )1053 ->and(1054 $expected = [1055 $methodName =>1056 [1057 4 => 1,1058 5 => -1,1059 6 => -1,1060 7 => -1,1061 8 => -2,1062 ]1063 ]1064 )1065 ->and($coverage->setReflectionClassFactory(function () use ($class) {1066 return $class;1067 }))1068 ->and($coverage->addXdebugDataForTest($this, $xdebugData))1069 ->then1070 ->array($coverage->getCoverageForClass($className))->isEqualTo($expected)1071 ;1072 }1073 public function testGetNumberOfCoverableLinesInClass()1074 {1075 $this1076 ->if($coverage = new testedClass())1077 ->then1078 ->integer($coverage->getNumberOfCoverableLinesInClass(uniqid()))->isZero()1079 ->if($classController = new mock\controller())1080 ->and($classController->disableMethodChecking())1081 ->and($classController->__construct = function () {1082 })1083 ->and($classController->getName = function () use (& $className) {1084 return $className;1085 })1086 ->and($classController->getFileName = function () use (& $classFile) {1087 return $classFile;1088 })1089 ->and($classController->getTraits = [])1090 ->and($classController->getStartLine = 1)1091 ->and($classController->getEndLine = 12)1092 ->and($class = new \mock\reflectionClass(uniqid(), $classController))1093 ->and($methodController = new mock\controller())1094 ->and($methodController->__construct = function () {1095 })1096 ->and($methodController->getName = function () use (& $methodName) {1097 return $methodName;1098 })1099 ->and($methodController->isAbstract = false)1100 ->and($methodController->getFileName = function () use (& $classFile) {1101 return $classFile;1102 })1103 ->and($methodController->getDeclaringClass = function () use ($class) {1104 return $class;1105 })1106 ->and($methodController->getStartLine = 4)1107 ->and($methodController->getEndLine = 8)1108 ->and($classController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $methodController)])1109 ->and($classFile = uniqid())1110 ->and($className = uniqid())1111 ->and($methodName = uniqid())1112 ->and(1113 $xdebugData = [1114 $classFile => [1115 3 => -2,1116 4 => 1,1117 5 => -1,1118 6 => -1,1119 7 => -1,1120 8 => -2,1121 9 => -11122 ],1123 uniqid() => [1124 5 => 2,1125 6 => 3,1126 7 => 4,1127 8 => 3,1128 9 => 21129 ]1130 ]1131 )1132 ->and($coverage->setReflectionClassFactory(function () use ($class) {1133 return $class;1134 }))1135 ->and($coverage->addXdebugDataForTest($this, $xdebugData))1136 ->then1137 ->integer($coverage->getNumberOfCoverableLinesInClass($className))->isEqualTo(4)1138 ;1139 }1140 public function testGetNumberOfCoveredLinesInClass()1141 {1142 $this1143 ->if($coverage = new testedClass())1144 ->then1145 ->integer($coverage->getNumberOfCoveredLinesInClass(uniqid()))->isZero()1146 ->if($classController = new mock\controller())1147 ->and($classController->disableMethodChecking())1148 ->and($classController->__construct = function () {1149 })1150 ->and($classController->getName = function () use (& $className) {1151 return $className;1152 })1153 ->and($classController->getFileName = function () use (& $classFile) {1154 return $classFile;1155 })1156 ->and($classController->getTraits = [])1157 ->and($classController->getStartLine = 1)1158 ->and($classController->getEndLine = 12)1159 ->and($class = new \mock\reflectionClass(uniqid(), $classController))1160 ->and($methodController = new mock\controller())1161 ->and($methodController->__construct = function () {1162 })1163 ->and($methodController->getName = function () use (& $methodName) {1164 return $methodName;1165 })1166 ->and($methodController->isAbstract = false)1167 ->and($methodController->getFileName = function () use (& $classFile) {1168 return $classFile;1169 })1170 ->and($methodController->getDeclaringClass = function () use ($class) {1171 return $class;1172 })1173 ->and($methodController->getStartLine = 4)1174 ->and($methodController->getEndLine = 8)1175 ->and($classController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $methodController)])1176 ->and($classFile = uniqid())1177 ->and($className = uniqid())1178 ->and($methodName = uniqid())1179 ->and(1180 $xdebugData = [1181 $classFile => [1182 3 => -2,1183 4 => 1,1184 5 => -1,1185 6 => -1,1186 7 => -1,1187 8 => -2,1188 9 => -11189 ],1190 uniqid() => [1191 5 => 2,1192 6 => 3,1193 7 => 4,1194 8 => 3,1195 9 => 21196 ]1197 ]1198 )1199 ->and($coverage->setReflectionClassFactory(function () use ($class) {1200 return $class;1201 }))1202 ->and($coverage->addXdebugDataForTest($this, $xdebugData))1203 ->then1204 ->integer($coverage->getNumberOfCoveredLinesInClass($className))->isEqualTo(1)1205 ;1206 }1207 public function testGetValueForMethod()1208 {1209 $this1210 ->if($coverage = new testedClass())1211 ->then1212 ->variable($coverage->getValueForMethod(uniqid(), uniqid()))->isNull()1213 ->if($classController = new mock\controller())1214 ->and($classController->disableMethodChecking())1215 ->and($classController->__construct = function () {1216 })1217 ->and($classController->getName = function () use (& $className) {1218 return $className;1219 })1220 ->and($classController->getFileName = function () use (& $classFile) {1221 return $classFile;1222 })1223 ->and($classController->getTraits = [])1224 ->and($classController->getStartLine = 1)1225 ->and($classController->getEndLine = 12)1226 ->and($class = new \mock\reflectionClass(uniqid(), $classController))1227 ->and($methodController = new mock\controller())1228 ->and($methodController->__construct = function () {1229 })1230 ->and($methodController->getName = function () use (& $methodName) {1231 return $methodName;1232 })1233 ->and($methodController->isAbstract = false)1234 ->and($methodController->getFileName = function () use (& $classFile) {1235 return $classFile;1236 })1237 ->and($methodController->getDeclaringClass = function () use ($class) {1238 return $class;1239 })1240 ->and($methodController->getStartLine = 4)1241 ->and($methodController->getEndLine = 8)1242 ->and($classController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $methodController)])1243 ->and($classFile = uniqid())1244 ->and($className = uniqid())1245 ->and($methodName = uniqid())1246 ->and(1247 $xdebugData = [1248 $classFile => [1249 3 => -2,1250 4 => -1,1251 5 => -1,1252 6 => -1,1253 7 => -1,1254 8 => -2,1255 9 => -21256 ],1257 uniqid() => [1258 5 => 2,1259 6 => 3,1260 7 => 4,1261 8 => 3,1262 9 => 21263 ]1264 ]1265 )1266 ->and($coverage->setReflectionClassFactory(function () use ($class) {1267 return $class;1268 }))1269 ->and($coverage->addXdebugDataForTest($this, $xdebugData))1270 ->then1271 ->variable($coverage->getValueForMethod(uniqid(), uniqid()))->isNull()1272 ->variable($coverage->getValueForMethod($className, uniqid()))->isNull()1273 ->float($coverage->getValueForMethod($className, $methodName))->isEqualTo(0.0)1274 ->if(1275 $xdebugData = [1276 $classFile => [1277 3 => -2,1278 4 => 1,1279 5 => -1,1280 6 => -1,1281 7 => -1,1282 8 => -2,1283 9 => -11284 ],1285 uniqid() => [1286 5 => 2,1287 6 => 3,1288 7 => 4,1289 8 => 3,1290 9 => 21291 ]1292 ]1293 )1294 ->and($coverage->reset()->addXdebugDataForTest($this, $xdebugData))1295 ->then1296 ->variable($coverage->getValueForMethod(uniqid(), uniqid()))->isNull()1297 ->variable($coverage->getValueForMethod($className, uniqid()))->isNull()1298 ->float($coverage->getValueForMethod($className, $methodName))->isEqualTo(1 / 4)1299 ->if(1300 $xdebugData = [1301 $classFile => [1302 3 => -2,1303 4 => 1,1304 5 => -1,1305 6 => -1,1306 7 => 1,1307 8 => -2,1308 9 => -11309 ],1310 uniqid() => [1311 5 => 2,1312 6 => 3,1313 7 => 4,1314 8 => 3,1315 9 => 21316 ]1317 ]1318 )1319 ->and($coverage->reset()->addXdebugDataForTest($this, $xdebugData))1320 ->then1321 ->variable($coverage->getValueForMethod(uniqid(), uniqid()))->isNull()1322 ->variable($coverage->getValueForMethod($className, uniqid()))->isNull()1323 ->float($coverage->getValueForMethod($className, $methodName))->isEqualTo(2 / 4)1324 ->if(1325 $xdebugData = [1326 $classFile => [1327 3 => -2,1328 4 => 1,1329 5 => 1,1330 6 => 1,1331 7 => 1,1332 8 => -2,1333 9 => -11334 ],1335 uniqid() => [1336 5 => 2,1337 6 => 3,1338 7 => 4,1339 8 => 3,1340 9 => 21341 ]1342 ]1343 )1344 ->and($coverage->reset()->addXdebugDataForTest($this, $xdebugData))1345 ->then1346 ->variable($coverage->getValueForMethod(uniqid(), uniqid()))->isNull()1347 ->variable($coverage->getValueForMethod($className, uniqid()))->isNull()1348 ->float($coverage->getValueForMethod($className, $methodName))->isEqualTo(1.0)1349 ;1350 }1351 public function testGetCoverageForMethod()1352 {1353 $this1354 ->if($coverage = new testedClass())1355 ->then1356 ->array($coverage->getCoverageForClass(uniqid()))->isEmpty()1357 ->if($classController = new mock\controller())1358 ->and($classController->disableMethodChecking())1359 ->and($classController->__construct = function () {1360 })1361 ->and($classController->getName = function () use (& $className) {1362 return $className;1363 })1364 ->and($classController->getFileName = function () use (& $classFile) {1365 return $classFile;1366 })1367 ->and($classController->getTraits = [])1368 ->and($classController->getStartLine = 1)1369 ->and($classController->getEndLine = 12)1370 ->and($class = new \mock\reflectionClass(uniqid(), $classController))1371 ->and($methodController = new mock\controller())1372 ->and($methodController->__construct = function () {1373 })1374 ->and($methodController->getName = function () use (& $methodName) {1375 return $methodName;1376 })1377 ->and($methodController->isAbstract = false)1378 ->and($methodController->getFileName = function () use (& $classFile) {1379 return $classFile;1380 })1381 ->and($methodController->getDeclaringClass = function () use ($class) {1382 return $class;1383 })1384 ->and($methodController->getStartLine = 4)1385 ->and($methodController->getEndLine = 8)1386 ->and($classController->getMethods = [new \mock\reflectionMethod(uniqid(), uniqid(), $methodController)])1387 ->and($classFile = uniqid())1388 ->and($className = uniqid())1389 ->and($methodName = uniqid())1390 ->and(1391 $xdebugData = [1392 $classFile => [1393 3 => -2,1394 4 => 1,1395 5 => -1,1396 6 => -1,1397 7 => -1,1398 8 => -2,1399 9 => -11400 ],1401 uniqid() => [1402 5 => 2,1403 6 => 3,1404 7 => 4,1405 8 => 3,1406 9 => 21407 ]1408 ]1409 )1410 ->and(1411 $expected = [1412 4 => 1,1413 5 => -1,1414 6 => -1,1415 7 => -1,1416 8 => -2,1417 ]1418 )1419 ->and($coverage = new testedClass())1420 ->and($coverage->setReflectionClassFactory(function () use ($class) {1421 return $class;1422 }))1423 ->and($coverage->addXdebugDataForTest($this, $xdebugData))1424 ->then1425 ->array($coverage->getCoverageForMethod($className, $methodName))->isEqualTo($expected)1426 ;1427 }1428 public function testExcludeMethod()1429 {1430 $this1431 ->if($coverage = new testedClass())1432 ->then1433 ->object($coverage->excludeMethod($method = uniqid()))->isIdenticalTo($coverage)1434 ->array($coverage->getExcludedMethods())->isEqualTo([$method])1435 ->object($coverage->excludeMethod($otherClass = rand(1, PHP_INT_MAX)))->isIdenticalTo($coverage)1436 ->array($coverage->getExcludedMethods())->isEqualTo([$method, (string) $otherClass])1437 ->object($coverage->excludeMethod($method))->isIdenticalTo($coverage)1438 ->array($coverage->getExcludedMethods())->isEqualTo([$method, (string) $otherClass])1439 ;1440 }1441 public function testExcludeClass()1442 {1443 $this1444 ->if($coverage = new testedClass())1445 ->then1446 ->object($coverage->excludeClass($class = uniqid()))->isIdenticalTo($coverage)1447 ->array($coverage->getExcludedClasses())->isEqualTo([$class])1448 ->object($coverage->excludeClass($otherClass = rand(1, PHP_INT_MAX)))->isIdenticalTo($coverage)1449 ->array($coverage->getExcludedClasses())->isEqualTo([$class, (string) $otherClass])1450 ->object($coverage->excludeClass($class))->isIdenticalTo($coverage)1451 ->array($coverage->getExcludedClasses())->isEqualTo([$class, (string) $otherClass])1452 ;1453 }1454 public function testExcludeNamespace()1455 {1456 $this1457 ->if($coverage = new testedClass())1458 ->then1459 ->object($coverage->excludeNamespace($namespace = uniqid()))->isIdenticalTo($coverage)1460 ->array($coverage->getExcludedNamespaces())->isEqualTo([$namespace])1461 ->object($coverage->excludeNamespace($otherNamespace = rand(1, PHP_INT_MAX)))->isIdenticalTo($coverage)1462 ->array($coverage->getExcludedNamespaces())->isEqualTo([$namespace, (string) $otherNamespace])1463 ->object($coverage->excludeNamespace($namespace))->isIdenticalTo($coverage)1464 ->array($coverage->getExcludedNamespaces())->isEqualTo([$namespace, (string) $otherNamespace])1465 ->object($coverage->excludeNamespace('\\' . ($anotherNamespace = uniqid()) . '\\'))->isIdenticalTo($coverage)1466 ->array($coverage->getExcludedNamespaces())->isEqualTo([$namespace, (string) $otherNamespace, $anotherNamespace])1467 ;1468 }1469 public function testExcludeDirectory()1470 {1471 $this1472 ->if($coverage = new testedClass())1473 ->then1474 ->object($coverage->excludeDirectory($directory = uniqid()))->isIdenticalTo($coverage)1475 ->array($coverage->getExcludedDirectories())->isEqualTo([$directory])1476 ->object($coverage->excludeDirectory($otherDirectory = rand(1, PHP_INT_MAX)))->isIdenticalTo($coverage)1477 ->array($coverage->getExcludedDirectories())->isEqualTo([$directory, (string) $otherDirectory])1478 ->object($coverage->excludeDirectory($directory))->isIdenticalTo($coverage)1479 ->array($coverage->getExcludedDirectories())->isEqualTo([$directory, (string) $otherDirectory])1480 ->object($coverage->excludeDirectory(($anotherDirectory = (DIRECTORY_SEPARATOR . uniqid())) . DIRECTORY_SEPARATOR))->isIdenticalTo($coverage)1481 ->array($coverage->getExcludedDirectories())->isEqualTo([$directory, (string) $otherDirectory, $anotherDirectory])1482 ;1483 }1484 public function testIsInExcludedMethods()1485 {1486 $this1487 ->if($coverage = new testedClass())1488 ->then1489 ->boolean($coverage->isInExcludedMethods(uniqid()))->isFalse()1490 ->if($coverage->excludeMethod($method = uniqid()))1491 ->then1492 ->boolean($coverage->isInExcludedMethods(uniqid()))->isFalse()1493 ->boolean($coverage->isInExcludedMethods($method))->isTrue()1494 ->if($coverage->excludeMethod('/.+/'))1495 ->then1496 ->boolean($coverage->isInExcludedMethods(uniqid()))->isTrue()1497 ;1498 }1499 public function testIsInExcludedClasses()1500 {1501 $this1502 ->if($coverage = new testedClass())1503 ->then1504 ->boolean($coverage->isInExcludedClasses(uniqid()))->isFalse()1505 ->if($coverage->excludeClass($class = uniqid()))1506 ->then1507 ->boolean($coverage->isInExcludedClasses(uniqid()))->isFalse()1508 ->boolean($coverage->isInExcludedClasses($class))->isTrue()...

Full Screen

Full Screen

Encryption.php

Source:Encryption.php Github

copy

Full Screen

...35 $ciphers = \openssl_get_cipher_methods();36 $ciphersAndAliases = \openssl_get_cipher_methods(true);37 $cipherAliases = \array_diff($ciphersAndAliases, $ciphers);38 $ciphers = \array_filter($ciphers, static function ($n) {39 $excludeMethods = [40 'ecb', 'des', 'rc2', 'rc4', 'md5',41 '-ocb', '-ccm', '-gcm', '-wrap'42 ];43 foreach ($excludeMethods as $excludeMethod) {44 if (\mb_stripos($n, $excludeMethod) !== false) {45 return false;46 }47 }48 return true;49 });50 $cipherAliases = \array_filter($cipherAliases, static function ($c) {51 $excludeMethods = [52 'des', 'rc2', '-wrap'53 ];54 foreach ($excludeMethods as $excludeMethod) {55 if (\mb_stripos($c, $excludeMethod) !== false) {56 return false;57 }58 }59 return true;60 });61 $methods = \array_merge($ciphers, $cipherAliases);62 return \array_filter($methods, static function ($c) {63 $forbiddenMethods = [64 'AES-128-CBC-HMAC-SHA1', 'AES-256-CBC-HMAC-SHA1',65 'aes-128-cbc-hmac-sha1', 'aes-256-cbc-hmac-sha1'66 ];67 return !\in_array($c, $forbiddenMethods, true);68 });69 }...

Full Screen

Full Screen

excludeMethod

Using AI Code Generation

copy

Full Screen

1$coverage->excludeMethod('test');2$coverage->excludeClass('test');3$coverage->excludePackage('test');4$coverage->excludeDirectory('test');5$coverage->excludeFile('test');6$coverage->addUncoveredFilesFromWhitelist('test');7$coverage->setProcessUncoveredFilesFromWhitelist('test');8$coverage->setAddUncoveredFilesFromWhitelist('test');9$coverage->setForceCoversAnnotation('test');10$coverage->setCheckForUnintentionallyCoveredCode('test');11$coverage->setUnintentionallyCoveredSubclassesWhitelist('test');12$coverage->setUnintentionallyCoveredCodeWhitelist('test');13$coverage->setForceCoversAnnotation('test');14$coverage->setCheckForUnintentionallyCoveredCode('test');15$coverage->setUnintentionallyCoveredSubclassesWhitelist('test');16$coverage->setUnintentionallyCoveredCodeWhitelist('test');17$coverage->setForceCoversAnnotation('test');18$coverage->setCheckForUnintentionallyCoveredCode('test

Full Screen

Full Screen

excludeMethod

Using AI Code Generation

copy

Full Screen

1$cov->excludeMethod('class', 'method');2$cov->excludeClass('class');3$cov->excludeDirectory('directory');4$cov->excludeFile('file');5$cov->excludeNamespace('namespace');6$cov->excludePackage('package');7$cov->excludeProject();8$cov->excludeGroup('group');9$cov->excludeAll();10$cov->exclude('class', 'method');11$cov->excludeByRegex('regex');12$cov->excludeByList('list');13$cov->excludeByFilter('filter');14$cov->excludeByWhiteList('whitelist');15$cov->excludeByBlackList('blacklist');16$cov->excludeByGroup('group');17$cov->excludeByProject();18$cov->excludeByDirectory('directory');19$cov->excludeByPackage('package');

Full Screen

Full Screen

excludeMethod

Using AI Code Generation

copy

Full Screen

1$coverage->excludeMethod('Foo', 'Bar');2$coverage->excludeMethod('Foo', 'Baz');3$coverage->excludeMethod('Foo', 'Bar');4$coverage->excludeMethod('Foo', 'Baz');5$coverage->excludeMethod('Foo', 'Bar');6$coverage->excludeMethod('Foo', 'Baz');7if (file_exists('1.php')) {8 $coverage->excludeMethod('Foo', 'Bar');9 $coverage->excludeMethod('Foo', 'Baz');10}11if (file_exists('2.php')) {12 $coverage->excludeMethod('Foo', 'Bar');13 $coverage->excludeMethod('Foo', 'Baz');14}15if (file_exists('3.php')) {16 $coverage->excludeMethod('Foo', 'Bar');17 $coverage->excludeMethod('Foo', 'Baz');18}

Full Screen

Full Screen

excludeMethod

Using AI Code Generation

copy

Full Screen

1require_once 'PHPUnit/Extensions/PhptTestSuite.php';2require_once 'PHPUnit/Extensions/PhptTestCase.php';3require_once 'PHPUnit/Extensions/PhptTest.php';4require_once 'PHPUnit/Extensions/PhptTestSuite.php';5require_once 'PHPUnit/Extensions/PhptTestCase.php';6require_once 'PHPUnit/Extensions/PhptTest.php';7require_once 'PHPUnit/Extensions/PhptTestSuite.php';8require_once 'PHPUnit/Extensions/PhptTestCase.php';9require_once 'PHPUnit/Extensions/PhptTest.php';10require_once 'PHPUnit/Extensions/PhptTestSuite.php';11require_once 'PHPUnit/Extensions/PhptTestCase.php';12require_once 'PHPUnit/Extensions/PhptTest.php';13require_once 'PHPUnit/Extensions/PhptTestSuite.php';14require_once 'PHPUnit/Extensions/PhptTestCase.php';15require_once 'PHPUnit/Extensions/PhptTest.php';16require_once 'PHPUnit/Extensions/PhptTestSuite.php';17require_once 'PHPUnit/Extensions/PhptTestCase.php';18require_once 'PHPUnit/Extensions/PhptTest.php';19require_once 'PHPUnit/Extensions/PhptTestSuite.php';20require_once 'PHPUnit/Extensions/PhptTestCase.php';21require_once 'PHPUnit/Extensions/PhptTest.php';22require_once 'PHPUnit/Extensions/PhptTestSuite.php';23require_once 'PHPUnit/Extensions/PhptTestCase.php';24require_once 'PHPUnit/Extensions/PhptTest.php';25require_once 'PHPUnit/Extensions/PhptTestSuite.php';26require_once 'PHPUnit/Extensions/PhptTestCase.php';27require_once 'PHPUnit/Extensions/PhptTest.php';28require_once 'PHPUnit/Extensions/PhptTestSuite.php';29require_once 'PHPUnit/Extensions/PhptTestCase.php';30require_once 'PHPUnit/Extensions/PhptTest.php';31require_once 'PHPUnit/Extensions/PhptTestSuite.php';32require_once 'PHPUnit/Extensions/PhptTestCase.php';33require_once 'PHPUnit/Extensions/PhptTest.php';34require_once 'PHPUnit/Extensions/PhptTestSuite.php';35require_once 'PHPUnit/Extensions/PhptTestCase.php';36require_once 'PHPUnit/Extensions/PhptTest.php';37require_once 'PHPUnit/Extensions/PhptTestSuite.php';38require_once 'PHPUnit/Extensions/PhptTestCase.php';39require_once 'PHPUnit/Extensions/PhptTest.php';40require_once 'PHPUnit/Extensions/PhptTestSuite.php';

Full Screen

Full Screen

excludeMethod

Using AI Code Generation

copy

Full Screen

1$coverage->excludeMethod('1.php', 'testMethod');2$coverage->excludeClass('1.php', 'testClass');3$coverage->excludeDirectory('1.php', 'testDirectory');4$coverage->excludeFile('1.php', 'testFile');5$coverage->excludePackage('1.php', 'testPackage');6$coverage->excludeNamespace('1.php', 'testNamespace');

Full Screen

Full Screen

excludeMethod

Using AI Code Generation

copy

Full Screen

1$coverage->excludeMethod('test','test');2$coverage->excludeFile('test.php');3$coverage->excludeDirectory('test');4$coverage->excludeClass('test');5$coverage->excludePackage('test');6$coverage->excludeNamespace('test');7$coverage->excludeGroup('test');8$coverage->excludeGroup('test');9$coverage->includeMethod('test','test');10$coverage->includeFile('test.php');11$coverage->includeDirectory('test');12$coverage->includeClass('test');13$coverage->includePackage('test');14$coverage->includeNamespace('test');15$coverage->includeGroup('test');16$coverage->includeGroup('test');17$coverage->addDirectoryToWhitelist('test');18$coverage->addFileToWhitelist('test.php');19$coverage->addDirectoryToWhitelist('test');20$coverage->addFileToWhitelist('t

Full Screen

Full Screen

excludeMethod

Using AI Code Generation

copy

Full Screen

1require_once 'PHPUnit/Extensions/CodeCoverage.php';2$coverage = new PHPUnit_Extensions_CodeCoverage();3$coverage->start('1.php');4$coverage->stop();5$coverage->excludeMethod('1.php', 'method1');6$coverage->excludeMethod('1.php', 'method2');7$coverage->excludeMethod('1.php', 'method3');8$coverage->excludeMethod('1.php', 'method4');9$coverage->excludeMethod('1.php', 'method5');10$coverage->excludeMethod('1.php', 'method6');11$coverage->excludeMethod('1.php', 'method7');12$coverage->excludeMethod('1.php', 'method8');13$coverage->excludeMethod('1.php', 'method9');14$coverage->excludeMethod('1.php', 'method10');15$coverage->excludeMethod('1.php', 'method11');16$coverage->excludeMethod('1.php', 'method12');17$coverage->excludeMethod('1.php', 'method13');18$coverage->excludeMethod('1.php', 'method14');19$coverage->excludeMethod('1.php', 'method15');20$coverage->excludeMethod('1.php', 'method16');21$coverage->excludeMethod('1.php', 'method17');22$coverage->excludeMethod('1.php', 'method18');23$coverage->excludeMethod('1.php', 'method19');24$coverage->excludeMethod('1.php', 'method20');25$coverage->excludeMethod('1.php', 'method21');26$coverage->excludeMethod('1.php', 'method22');27$coverage->excludeMethod('1.php', 'method23');28$coverage->excludeMethod('1.php', 'method24');29$coverage->excludeMethod('1.php', 'method25');30$coverage->excludeMethod('1.php', 'method26');31$coverage->excludeMethod('1.php', 'method27');32$coverage->excludeMethod('1.php', 'method28');33$coverage->excludeMethod('1.php', 'method29');34$coverage->excludeMethod('1.php', 'method30');35$coverage->excludeMethod('1.php', 'method31');36$coverage->excludeMethod('1.php', 'method32');37$coverage->excludeMethod('1.php', 'method33');38$coverage->excludeMethod('1.php', 'method34');39$coverage->excludeMethod('1.php', 'method35');

Full Screen

Full Screen

excludeMethod

Using AI Code Generation

copy

Full Screen

1require_once 'CodeCoverage.php';2$coverage = new CodeCoverage();3$coverage->excludeMethod('CodeCoverage', 'excludeMethod');4$coverage->start();5include '1.php';6$coverage->stop();7$coverage->report();

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Atoum automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in coverage

Trigger excludeMethod code on LambdaTest Cloud Grid

Execute automation tests with excludeMethod on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful