FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
zipcode/tests/ZipCodeTest.php at old-zipcode · netdragoon/zipcode · GitHub
netdragoon
/
zipcode
Public
Notifications
You must be signed in to change notification settings
Fork
17
Star
45
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
zipcode
/
tests
/
ZipCodeTest.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
46 lines (35 loc) · 1003 Bytes
Breadcrumbs
zipcode
/
tests
/
ZipCodeTest.php
Copy path
File metadata and controls
46 lines (35 loc) · 1003 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
declare
(strict_types=
1
);
use
Canducci
\
ZipCode
\
ZipCode
;
use
Canducci
\
ZipCode
\
ZipCodeRequest
;
use
Canducci
\
ZipCode
\
ZipCodeTrait
;
use
Illuminate
\
Cache
\
CacheManager
;
use
PHPUnit
\
Framework
\
TestCase
;
use
Illuminate
\
Contracts
\
Foundation
\
Application
;
//https://packagist.org/packages/php-extended/php-simple-cache-filesystem
class
ZipCodeTest
extends
TestCase
{
use
ZipCodeTrait;
public
function
testOk
()
{
$
this
->
assertNotNull
(
'
Ok
'
);
}
public
function
getZipCodeInstance
():
ZipCode
{
$
instance
=
new
Application
();
return
new
ZipCode
(
new
CacheManager
(
$
instance
),
new
ZipCodeRequest
()
);
}
public
function
getZipCodeInfoInstance
():
ZipCodeInfo
{
$
zipCode
=
$
this
->
getZipCodeInstance
();
return
$
zipCode
->
find
(
'
01414000
'
);
}
public
function
testZipCodeInfo
():
void
{
$
info
=
$
this
->
getZipCodeInstance
()->
find
(
'
01001000
'
);
$
this
->
assertNotNull
(
$
info
);
}
}
Back
|
FazBrowse Home
|
New Git URL